Description Usage Arguments Value Author(s) See Also Examples
View source: R/longitudinal2array.r
Converts an object of the longitudinal
-class into a 3-dim array (containing time-series data of multiple individuals).
1 |
Y |
Object of the |
A array
-object containing time-series data.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
array2longitudinal
, dataVAR1
, longitudinal
, as.longitudinal
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 4; T <- 10
# set model parameters
SigmaE <- diag(p)/4
A <- createA(p, "chain")
# generate data
Y <- dataVAR1(n, T, A, SigmaE)
# convert data to a longitudinal-object
Ylongitudinal <- array2longitudinal(Y)
# convert back to array-format
Yback <- longitudinal2array(Ylongitudinal)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.