update_pars: Perform one EM-step

Description Usage Arguments Value

View source: R/PARAMETER_UPDATES.R

Description

Function that updates the parameters from the current output of the KF-function i.e. one updating step in the EM algorithm

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
update_pars(
  kf,
  p,
  d,
  t,
  q,
  tol = 0.001,
  maxit = 50,
  Omega_diagonal = FALSE,
  model = "A"
)

Arguments

kf

a Kalman filter object, output from eval_tvRRR() / filter_modelA() / filter_modelB() function

p

dimension of the target

d

latent dimension

t

length of the time series

q

dimension of the predictors

tol

tolerance for convergence in iterative parameter updating

Omega_diagonal

logical, indicates whether Omega is assumed to be diagonal

Value

List of updated parameters:

Omega
beta

(when fitting model A)

alpha

(when fitting model B)

Sigma
Gamma

(when considering external variables)

Q

value of the expected likelihood Q(Theta|Theta^j)


b-brune/tvRRR documentation built on Dec. 19, 2021, 6:37 a.m.