Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/ridgeVAR1fused.r
Ridge penalized maximum likelihood estimation of the parameters of the first-order Vector Auto-Regressive model, with a (possibly) unbalanced experimental set-up. The VAR(1)-process is assumed to have mean zero.
1 2 3 4 5 6 7 8 9 | ridgeVAR1fused(Y, id, lambdaA=0, lambdaF=0, lambdaP=0,
targetA=matrix(0, dim(Y)[1], dim(Y)[1]),
targetP=matrix(0, dim(Y)[1], dim(Y)[1]),
targetPtype="none", fitA="ml",
zerosA=matrix(nrow=0, ncol=2), zerosAfit="sparse",
zerosP=matrix(nrow=0, ncol=2), cliquesP=list(),
separatorsP=list(), unbalanced=matrix(nrow=0, ncol=2),
diagP=FALSE, efficient=TRUE, nInit=100, nInitA=5,
minSuccDiff=0.001, minSuccDiffA=0.001)
|
Y |
Three-dimensional |
id |
A vector with group indices comprising of integers only. First group is represented by '0', the next by '1', and so on until the last. |
lambdaA |
Ridge penalty parameter (positive |
lambdaF |
Fused ridge penalty parameter (positive |
lambdaP |
Ridge penalty parameter (positive |
targetA |
Target |
targetP |
Target |
fitA |
A |
targetPtype |
A |
zerosA |
A |
zerosAfit |
A |
zerosP |
A |
cliquesP |
A |
separatorsP |
A |
unbalanced |
A |
diagP |
A |
efficient |
A |
nInit |
Maximum number of iterations (positive |
nInitA |
Maximum number of iterations (positive |
minSuccDiff |
Minimum distance (positive |
minSuccDiffA |
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 VAR(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}^{\mathrm{T}}.
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}^{\mathrm{T}},
which is achieved by setting when efficient=TRUE
. Both estimators are adjusted accordingly when dealing with an unbalanced design.
A list-object with slots:
As |
Ridge ML estimates of the matrices \mathbf{A}_g, stacked and stored as a single rectangular |
P |
Ridge ML estimate of the inverse error covariance |
lambdaA |
Positive |
lambdaF |
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 fitA="ml"
.
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.
loglikLOOCVVAR1
, ridgeVAR1
, ridgePchordal
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # set dimensions (p=covariates, n=individuals, T=time points, G=groups)
p <- 3; n <- 12; T <- 10; G <- 3
# set model parameters
SigmaE <- matrix(1/2, p, p)
diag(SigmaE) <- 1
A1 <- -createA(p, "clique", nCliques=1, nonzeroA=0.1)
A2 <- t(createA(p, "chain", nBands=1, nonzeroA=0.1))
A3 <- (A1 + A2) / 2
# generate data
Y1 <- dataVAR1(n/G, T, A1, SigmaE)
Y2 <- dataVAR1(n/G, T, A2, SigmaE)
Y3 <- dataVAR1(n/G, T, A3, SigmaE)
Y <- abind::abind(Y1, Y2, Y3, along=3)
id <- c(rep(1, n/G), rep(2, n/G), rep(3, n/G))-1
VAR1hats <- ridgeVAR1fused(Y, id, lambdaA=1, lambdaF=1, lambdaP=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.