fit_modelB: Runs the expectation maximization algorithm for Model B...

Description Usage Arguments Value

View source: R/FITTING.R

Description

Runs the expectation maximization algorithm for Model B Input:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
fit_modelB(
  X,
  y,
  u = NULL,
  d,
  alpha = NULL,
  beta_00 = NULL,
  Gamma = NULL,
  P_00 = 1000 * diag(ncol(X) * d),
  Sigma = NULL,
  Omega = NULL,
  Omega_diagonal = FALSE,
  maxit = 100,
  silent = FALSE,
  tol_finish = 0.001,
  tol_EMstep = 0.001,
  return_covariances = FALSE,
  initialize = "RRR",
  Gamma_rrr = "identity"
)

Arguments

X

predictors (t x q-dimensional)

y

target (t x p-dimensional)

u

additional predictors (t x q-dimensional)

d

latent dimension

alpha

starting value for the algorithm, default NULL (RRR)

beta_00

starting value for beta', default NULL (RRR)

Gamma

starting value for the fixed full-rank coefficient matrix, default NULL (RRR)

P_00

starting state covariance (default 1000 * diag(p x d))

Sigma

column covariance of states (default 0.01 * diag(d))

Omega

error covariance (defaults to residual covariance from RRR, or respective starting values)

Omega_diagonal

logical, indicates whether Omega is assumed to be a diagonal matrix (advisable if p is large)

maxit

maximum number of iterations for the EM algorithm

silent

logical, indicates whether progress should be printed during model fitting

tol_finish

tolerance for stopping the EM algorithm

tol_EMstep

tolerance for iterative estimation during EM step

Output:

return_covariances

logical, indicates whether the state covariances should be returned (might be necessary for evaluation of the likelihood).

initialize

either "RRR" or "random", applies if no starting values are handed over

Gamma_rrr

type of normalization for the starting values obtained from RRR

Value

A named list of lists with elements


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