Description Usage Arguments Details Value See Also
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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 |
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_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 |
... |
additional parameters such as starting values handed over to the EM-algorithms for models A and B, see 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
return_covariances
logical, indicates whether the state covariances
should be returned (might be necessary for evaluation
of the likelihood).
silent
logical, indicates whether progress should be printed during
model fitting
maxit
maximum number of iterations for the EM algorithm
tol_finish
tolerance for stopping the EM algorithm
tol_EMstep
tolerance for iterative estimation during EM step
Arguments regarding the starting values for the EM-algorithm are, if no initial values are handed over:
initialize
either "RRR"
or "random"
, applies if no starting
values are handed over, then initialization is either carried
out randomly or from time-constant reduced rank regression.
Gamma_rrr
if initialization is carried out by RRR, this specifies the
normalization of α and β
If we want to hand over starting values explicitly:
alpha_00
initial value for the Kalman filter in model A
alpha
starting value for the time-constant matrix α in model B
beta_00
initial value for the Kalman filter in model B. ATTENTION:
this has to be the transpose of β, i.e. β'
beta
starting value for the time-constant matrix β
Gamma
starting value for the fixed full-rank coefficient matrix
P_00
starting state covariance (default 1000 * diag(p * d)
for
model A and 1000 * diag(q * d)
for model B)
Sigma
column covariance of states (default 0.1 * diag(d))
Omega
error covariance (defaults to residual covariance from the starting values)
Furthermore:
Omega_diagonal
logical, indicates whether Omega is assumed to be a
diagonal matrix (advisable if p is large)
An object of class tvRRR
, that is a named list of lists with elements
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))
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-1
predicted 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
contains P_t^T[t+1, , ]
which is necessary for one-step
ahead prediction of tvRRR
object.
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)
the parameters used for filtering:
Sigma – (d, d)
Omega – (p, p)
beta – (q, d) (for model A)
alpha – (p, d) (for model B)
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
Message containing parameter stages at convergence
Value of the information criterion for the selected model
The rank of the model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.