Main function, state space model multiple imputation with unanimous changepoints
Source:R/SSMimpute_unanimous_cpts.R
SSMimpute_unanimous_cpts.Rd
Main function, state space model multiple imputation with unanimous changepoints
Usage
SSMimpute_unanimous_cpts(
data_ss_ori,
formula_var,
ss_param_temp,
initial_imputation_option = "StructTS",
estimate_convergence_cri = 0.01,
lik_convergence_cri = 0.01,
stepsize_for_newpart = 1/3,
max_iteration = 100,
cpt_learning_param = list(cpt_method = "mean", burnin = 1/10, mergeband = 20,
convergence_cri = 15),
cpt_initial_guess_option = "ignore",
dlm_option = "smooth",
m = 5,
seed = 1,
printFlag = T
)
Arguments
- data_ss_ori
contains all information, and only selected variables in formula_var enters the state space model
- formula_var
select variables from
data_ss
into the statespace model- ss_param_temp
a list of parameters to set up state-space model
m0
: initial values for statesC0
: initial values for variance of statesinits
: initial values for the estimating of all NA terms, via maximizing likelihoodAR1_coeffi
: variables, whose coefficient is a AR(1) process; if none, then is NULLrw_coeffi
: variables, whose coefficient is a random walk process;if none, then is NULLw_cp_param
: variables, whose coefficients are periodic fixed (may shift to other levels over time, but fixed within periods), it contains a list of parameters for each variable whose coefficient level shifts to different values. Details for variable:variable
: the name of the variable (Required);segments
: how many segments of constant coefficient (Required);changepoints
:the corresponding changepoints for the separated segments, it can either be specified by the user or automatically inferred,fixed_cpts
only exist whenchangepoints
existsv_cp_param
: information about periodic observational variance V (may decrease or increase over time, but fixed within periods), it contains a list of parameters for each variable whose coefficient level shifts to different values. Details for variable:segments
: how many segments of constant coefficient (Required);changepoints
: the corresponding changepoints for the separated segments, it can either be specified by the user or automatically inferred,fixed_cpts
only exist whenchangepoints
exists
- initial_imputation_option
for the first iteration of imputing missing y, choose StructTS or others, and can't be "ignore"
- estimate_convergence_cri
critic value for convergence check, default 0.01
- lik_convergence_cri
critic value for convergence check, default 0.01
- stepsize_for_newpart
stepsize specified, default 1/3
- max_iteration
max iteration, default 100
- cpt_learning_param
a list of variable for change point learning
cpt_method
: either "mean" or "meanvar"burnin
: a positive number in (0,1)mergeband
: a positive integerAR1_coeffi
: variables, whose coefficient is a AR(1) process; if none, then is NULLrw_coeffi
: variables, whose coefficient is a random walk process;if none, then is NULLw_cp_param
: variables, whose coefficients are periodic fixed (may shift to other levels over time, but fixed within periods)v_cp_param
: information about periodic observational variance V (may decrease or increase over time, but fixed within periods)
- cpt_initial_guess_option
option for initially learning cpts in preparation period
- dlm_option
choose between smooth or filter
- m
number of draws for multiple imputation
- seed
random seed
- printFlag
whether we need to print the Flag plots.