Skip to contents

A helper function of mainfunction SSMimpute_unanimous_cpts

Usage

run.SSM_unanimous_cpts(
  data_ss,
  formula_var,
  ss_param_temp,
  max_iteration = 100,
  cpt_learning_param = list(cpt_method = "mean", burnin = 1/10, mergeband = 20,
    convergence_cri = 10),
  dlm_option = "smooth",
  printFlag = T
)

Arguments

data_ss

contains all information, and only selected variables in formula_var enters the statespace 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 states

  • C0: initial values for variance of states

  • inits: initial values for the estimating of all NA terms, via maximizing likelihood

  • AR1_coeffi: variables, whose coefficient is a AR(1) process; if none, then is NULL

  • rw_coeffi: variables, whose coefficient is a random walk process;if none, then is NULL

  • w_cp_param: variables, whose coefficients are periodic fixed (may shift to other levels over time, but fixed within periods), it contains a list of variables 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 when changepoints exists

  • v_cp_param: information about periodic observational variance V (may decrease or increase over time, but fixed within periods), it contains a list of variables 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 when changepoints exists

max_iteration

control for the convergence of changepoints, a positive integer

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 integer

  • AR1_coeffi: variables, whose coefficient is a AR(1) process; if none, then is NULL

  • rw_coeffi: variables, whose coefficient is a random walk process;if none, then is NULL

  • w_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)

dlm_option

using kalman filter or smoothing

printFlag

print data while processing

Value

a intermediate result