Description Usage Arguments Details Value Note Author(s) References See Also Examples
Ridge penalized maximum likelihood estimation of the parameters of the first-order vector auto-regressive model with time-varying covariates, in shorthand VARX(1) model. The VARX(1) model explains the current vector of observations \mathbf{Y}_{\ast,t+1} by a linear combination of the previous observation endogeneous vector and an exogeneous time-varying covariate: \mathbf{Y}_{\ast,t+1} = \mathbf{A} \mathbf{Y}_{\ast,t} + \mathbf{B} \mathbf{X}_{\ast,t+1} + \mathbf{\varepsilon}_{\ast,t+1}, where \mathbf{A} and \mathbf{B} are the lag one autoregression and time-varying regression coefficient matrix, respectively, and \mathbf{\varepsilon}_{\ast,t+2} the vector of errors (or innovations). The VARX(1)-process is assumed to have mean zero. The experimental design is allowed to be unbalanced.
1 2 3 4 5 6 7 8 9 | ridgeVARX1(Y, X, lambdaA=-1, lambdaB=-1, lambdaP=-1, lagX,
targetA=matrix(0, dim(Y)[1], dim(Y)[1]),
targetB=matrix(0, dim(Y)[1], dim(X)[1]),
targetP=matrix(0, dim(Y)[1], dim(Y)[1]), targetPtype="none",
fitAB="ml", zerosA=matrix(nrow=0, ncol=2),
zerosB=matrix(nrow=0, ncol=2), zerosAfit="sparse",
zerosBfit="sparse", zerosP=matrix(nrow=0, ncol=2), cliquesP=list(),
separatorsP=list(), unbalanced=matrix(nrow=0, ncol=2), diagP=FALSE,
efficient=TRUE, nInit=100, minSuccDiff=0.001)
|
Y |
Three-dimensional |
X |
Three-dimensional |
lambdaA |
Ridge penalty parameter (positive |
lambdaB |
Ridge penalty parameter (positive |
lambdaP |
Ridge penalty parameter (positive |
lagX |
|
targetA |
Target |
targetB |
Target |
targetP |
Target |
fitAB |
A |
targetPtype |
A |
zerosA |
A |
zerosB |
A |
zerosAfit |
A |
zerosBfit |
A |
zerosP |
A |
cliquesP |
A |
separatorsP |
A |
unbalanced |
A |
diagP |
A |
efficient |
A |
nInit |
Maximum number of iterations (positive |
minSuccDiff |
Minimum distance (positive |
If diagP=TRUE
, no penalization to estimation of the covariance matrix is applied. Consequently, the arguments lambdaP
and targetP
are ignored (if supplied).
The ridge ML estimator employs the following estimator of the variance of the VARX(1) process:
\frac{1}{n (\mathcal{T} - 1)} ∑_{i=1}^{n} ∑_{t=2}^{\mathcal{T}} \mathbf{Y}_{\ast,i,t} \mathbf{Y}_{\ast,i,t}^{\top}.
This is used when efficient=FALSE
. However, a more efficient estimator of this variance can be used
\frac{1}{n \mathcal{T}} ∑_{i=1}^{n} ∑_{t=1}^{\mathcal{T}} \mathbf{Y}_{\ast,i,t} \mathbf{Y}_{\ast,i,t}^{\top},
which is achieved by setting when efficient=TRUE
. Both estimators are adjusted accordingly when dealing with an unbalanced design.
A list-object with slots:
A |
Ridge ML estimate of the matrix \mathbf{A}, the |
B |
Ridge ML estimate of the matrix \mathbf{B}, the |
P |
Ridge ML estimate of the inverse error covariance |
lambdaA |
Positive |
lambdaB |
Positive |
lambdaP |
Positive |
When the target of the precision matrix is specified through the targetPtype
-argument, the target is data-driven and updated at each iteration when fitAB="ml"
.
In case λ_a \not= λ_b, the ridge ML estimates (conditional on the current estimate of \mathbf{Ω}_{\varepsilon}) of \mathbf{A} and \mathbf{B} are approximations. Their explicit evaluation involves a Kronecker product times a vector. Its full expansion is memory inefficient, in particular for (say) p_y > 50. If λ_a = λ_b the estimates of \mathbf{A} and \mathbf{B} can be evaluated through multiplications of matrices of order p_y+p_x (instead of p_y^2 + p_y p_x). The evaluation cannot be simplified computationally when λ_a \not= λ_b. To avoid the use of matrices of order p_y^2 + p_y p_x an approximation is used. For the approximation it is assumed that the contemporaneous covariance between \mathbf{Y}_t and \mathbf{X}_t is zero (for lag one), after which the estimates can be evaluated using matrices of order p_y+p_x.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
Miok, V., Wilting, S.M., Van Wieringen, W.N. (2019), “Ridge estimation of network models from time-course omics data”, Biometrical Journal, 61(2), 391-405.
default.target
, loglikLOOCVVAR1
, ridgeP
, ridgePchordal
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 4; T <- 10
# set model parameters
SigmaE <- diag(p)/4
Ax <- createA(p, "chain", nBands=1)
# generate time-varying covariates in accordance with VAR(1) process
X <- dataVAR1(n, T, Ax, SigmaE)
# set model parameters
B <- createA(p, "clique", nCliques=1)
A <- createA(p, "hub", nHubs=1)
# generate time-varying covariates in accordance with VAR(1) process
Y <- dataVARX1(X, A, B, SigmaE, lagX=0)
# fit VARX(1) model
ridgeVARX1(Y, X, 1, 1, 1, lagX=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.