Learn R Programming

ragt2ridges (version 0.1.9)

centerVAR1data: Zero-centering of time-course data

Description

Per individual, covariate-wise zero centering of the time-series data.

Usage

centerVAR1data(Y)

Arguments

Y
Three-dimensional array containing the data. The first, second and third dimensions correspond to covariates, time and samples, respectively.

Value

  • An array with dimensions as the input.

See Also

dataVAR1.

Examples

Run this code
# 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)

# plot data sampled from the VAR(1) model.
Ycentered <- centerVAR1data(Y)

Run the code above in your browser using DataLab