tvRRR: Fit the tvRRR model

Description Usage Arguments Details Value See Also

View source: R/FITTING.R

Description

The function fits the tvRRR model to an observed dataset using the EM-algorithm. Rank selection is performed automatically based on the BIC criterion. The model with the lowest BIC is selected.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
tvRRR(
  X,
  y,
  u = NULL,
  model = "A",
  d,
  select_rank = TRUE,
  d_max,
  Sigma_init = 0.1,
  ...
)

fit_tvRRR(X, y, u = NULL, d, model = "A", ...)

Arguments

X

predictors (t x q-dimensional numeric matrix)

y

target (t x p-dimensional numeric matrix)

u

additional predictors (t x k-dimensional numeric matrix)

model

determines the model to be fit, either "A" or "B".

d

(maximum) latent dimension, needs to be an integer and can at most be min(p, q)

select_rank

logical, indicates whether the rank should be selected by BIC or whether a model of rank d (or d_max) should be fit

d_max

maximum latent dimension, needs to be an integer and can at most be min(p, q)

Sigma_init

optional, modifies the initial state covariance defined as Sigma_init * diag(d)

...

additional parameters such as starting values handed over to the EM-algorithms for models A and B, see details.

Details

The tvRRR() function fits the tvRRR models of class A and B. The model is a reduced rank regression model, where the coefficient matrix can be decomposed in two ways: C_t = α_t β' (Model A) or C_t = α β_t' (Model B). For details on the model fitting algorithm see Brune et al. (2021+).

Precisely, model A is

y_t = α_tβ'x_t + Γ u_t + ε_t

and model B is given by

y_t = α β'x_t + Γ u_t + ε_t.

Both models are fitted by an EM-algorithm. The actual model fitting happens in fit_modelA and fit_modelB. The function tvRRR calls these functions and, if select_rank = TRUE performs model selection with BIC. Here, d_max denotes the maximum dimension that should be fitted. If d_max = NULL, d is interpreted as d_max. tvRRR determines starting values automatically, but also allows for manually handing over appropriate starting values. For details, also see fit_modelA()and fit_modelB().

Arguments that can be handed over to guide the behavior of the algorithm are

Arguments regarding the starting values for the EM-algorithm are, if no initial values are handed over:

If we want to hand over starting values explicitly:

Furthermore:

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

Value

An object of class tvRRR, that is a named list of lists with elements

states

the filtered states, a named list with elements

  • filtered (the filtered states) – one state matrix per row (t + 1 x p * d)

  • smoothed (the smoothed states) – one state matrix per row (t + 1 x p * d)

  • one-step-ahead (one-step ahead predictions of the states – one state matrix per row (t + 1 x p * d))

covariances

the filtered and smoothed covariances and lag-1 covariances, if return_covariances = TRUE, a named list with elements

  • P_t^t filtered covariances – array of dimensions (t+1, pd, pd)

  • P_t^t-1predicted covariances – (t, pd, pd)

  • P_t^T smoothed covariances – (t+1, pd, pd)

  • P_t-1t-2^T smoothed lag-1 covariances – (t, pd, pd),

else NULL

prediction_covariance

contains P_t^T[t+1, , ] which is necessary for one-step ahead prediction of tvRRR object.

data

the data handed over to the algorithms, a named list with elements

  • X predictors – (t, q)

  • y responses – (t, p)

  • u additional predictors – (t, k)

  • Z transition matrices (X_t'beta (x) I_p) – (t, p, p*d)

parameters

the parameters used for filtering:

  • Sigma – (d, d)

  • Omega – (p, p)

  • beta – (q, d) (for model A)

  • alpha – (p, d) (for model B)

likelihoods

list containing information on the data likelihood during the fitting procedure, i.e.

  • Q the negative expected log likelihood obtained from EM

  • logLik actual data log Likelihood for each iteration

convergence_information

Message containing parameter stages at convergence

BIC

Value of the information criterion for the selected model

rank

The rank of the model

See Also

fit_modelA, fit_modelB


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