Skip to contents

Dynamics Description

The Stable Persistence with Baseline-Moderated Autoregression process represents a bivariate dynamic system in which two latent psychological constructs (e.g., positive and negative affect) exhibit within-construct persistence over time through autoregressive dynamics. The transition matrix is diagonal, implying that each construct evolves according to its own self-regulatory process and there are no cross-lagged (reciprocal) influences between the constructs in the systematic dynamics.

Between-person heterogeneity in persistence is captured via a time-invariant baseline covariate xi∈{0,1}x_i \in \left\{ 0, 1 \right\} with one value per individual. The individual-specific transition matrix is modeled as vec(𝛃i)=vec(𝛃(xi))=vec(𝛃0)+vec(𝛃1)xi,\begin{equation} \mathrm{vec} \left( \boldsymbol{\beta}_i \right) = \mathrm{vec} \left( \boldsymbol{\beta} \left( x_i \right) \right) = \mathrm{vec} \left( \boldsymbol{\beta}_0 \right) + \mathrm{vec} \left( \boldsymbol{\beta}_1 \right) x_i, \end{equation} so that individuals with xi=0x_i = 0 follows 𝛃0\boldsymbol{\beta}_0, whereas individuals with xi=1x_i = 1 follow 𝛃0+𝛃1\boldsymbol{\beta}_0 + \boldsymbol{\beta}_1. Under the current specification, 𝛃1\boldsymbol{\beta}_1 increases the diagonal autoregressive parameters, implying that the xi=1x_i = 1 group exhibits greater persistenceβ€”deviations from an individual’s equilibrium decay more slowlyβ€”while remaining dynamically stable.

Between-person heterogeneity in baseline levels is also captured via the same time-invariant covariate xi∈{0,1}x_i \in \left\{ 0, 1 \right\} through the person-specific measurement intercept vector π›Ži=π›Ž(xi)=π›Ž0+π›Ž1xi,\begin{equation} \boldsymbol{\nu}_i = \boldsymbol{\nu}\left(x_i\right) = \boldsymbol{\nu}_0 + \boldsymbol{\nu}_1 x_i, \end{equation} so that individuals with xi=0x_i = 0 follow π›Ž0\boldsymbol{\nu}_0, whereas individuals with xi=1x_i = 1 follow π›Ž0+π›Ž1\boldsymbol{\nu}_0 + \boldsymbol{\nu}_1.

The process noise covariance allows for small disturbances that may be correlated across constructs, permitting coordinated innovations even though the lagged dynamics are decoupled. Measurement errors are assumed to be minimal and symmetric across indicators.

Model

The measurement model is given by 𝐲i,t=π›Ži+πš²π›ˆi,t+𝛆i,t,with𝛆i,tβˆΌπ’©(𝟎,𝚯)\begin{equation} \mathbf{y}_{i, t} = \boldsymbol{\nu}_{i} + \boldsymbol{\Lambda} \boldsymbol{\eta}_{i, t} + \boldsymbol{\varepsilon}_{i, t}, \quad \mathrm{with} \quad \boldsymbol{\varepsilon}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Theta} \right) \end{equation} where 𝐲i,t\mathbf{y}_{i, t}, π›ˆi,t\boldsymbol{\eta}_{i, t}, and 𝛆i,t\boldsymbol{\varepsilon}_{i, t} are random variables and π›Ži\boldsymbol{\nu}_{i}, 𝚲\boldsymbol{\Lambda}, and 𝚯\boldsymbol{\Theta} are model parameters. 𝐲i,t\mathbf{y}_{i, t} represents a vector of observed random variables, π›ˆi,t\boldsymbol{\eta}_{i, t} a vector of latent random variables, and 𝛆i,t\boldsymbol{\varepsilon}_{i, t} a vector of random measurement errors, at time tt and individual ii. π›Ži\boldsymbol{\nu}_{i} denotes a vector of person-specific intercepts while 𝚲\boldsymbol{\Lambda} denotes a matrix of factor loadings, and 𝚯\boldsymbol{\Theta} the covariance matrix of 𝛆\boldsymbol{\varepsilon} that is invariant across individuals. In this model, 𝚲\boldsymbol{\Lambda} is an identity matrix and 𝚯\boldsymbol{\Theta} is a symmetric matrix.

The dynamic structure is given by π›ˆi,t=𝛃iπ›ˆi,tβˆ’1+𝛇i,t,with𝛇i,tβˆΌπ’©(𝟎,𝚿)\begin{equation} \boldsymbol{\eta}_{i, t} = \boldsymbol{\beta}_{i} \boldsymbol{\eta}_{i, t - 1} + \boldsymbol{\zeta}_{i, t}, \quad \mathrm{with} \quad \boldsymbol{\zeta}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Psi} \right) \end{equation} where π›ˆi,t\boldsymbol{\eta}_{i, t}, π›ˆi,tβˆ’1\boldsymbol{\eta}_{i, t - 1}, and 𝛇i,t\boldsymbol{\zeta}_{i, t} are random variables, and 𝛃i\boldsymbol{\beta}_{i}, and 𝚿\boldsymbol{\Psi} are model parameters. Here, π›ˆi,t\boldsymbol{\eta}_{i, t} is a vector of latent variables at time tt and individual ii, π›ˆi,tβˆ’1\boldsymbol{\eta}_{i, t - 1} represents a vector of latent variables at time tβˆ’1t - 1 and individual ii, and 𝛇i,t\boldsymbol{\zeta}_{i, t} represents a vector of dynamic noise at time tt and individual ii. 𝛃i\boldsymbol{\beta}_{i} is a matrix of autoregression and cross regression coefficients for individual ii, and 𝚿\boldsymbol{\Psi} the covariance matrix of 𝛇i,t\boldsymbol{\zeta}_{i, t} that is invariant across all individuals. In this model, 𝚿\boldsymbol{\Psi} is a symmetric matrix.

Data Generation

Notation

Let t=1000t = 1000 be the number of time points and n=1000n = 1000 be the number of individuals. We simulate a total of time =11000= 11000 points per individual, discarding the first 1000010000 as burn-in. The analysis uses the final 10001000 measurement occasions.

Let the measurement model intercept vector π›Ž\boldsymbol{\nu} when X=0X = 0 be

(0.5βˆ’0.5).\begin{equation} \left( \begin{array}{c} 0.5 \\ -0.5 \\ \end{array} \right) . \end{equation}

Let the measurement model intercept vector π›Ž\boldsymbol{\nu} when X=1X = 1 be

(0.75βˆ’0.75).\begin{equation} \left( \begin{array}{c} 0.75 \\ -0.75 \\ \end{array} \right) . \end{equation}

Let the covariance matrix be

(0.1βˆ’0.05βˆ’0.050.1).\begin{equation} \left( \begin{array}{cc} 0.1 & -0.05 \\ -0.05 & 0.1 \\ \end{array} \right) . \end{equation}

Let the factor loadings matrix 𝚲\boldsymbol{\Lambda} be given by

𝚲=(1001).\begin{equation} \boldsymbol{\Lambda} = \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right) . \end{equation}

Let the measurement error covariance matrix 𝚯\boldsymbol{\Theta} be given by

𝚯=(0.5000.5).\begin{equation} \boldsymbol{\Theta} = \left( \begin{array}{cc} 0.5 & 0 \\ 0 & 0.5 \\ \end{array} \right) . \end{equation}

Let the initial condition π›ˆ0\boldsymbol{\eta}_{0} be given by

π›ˆ0βˆΌπ’©(π›π›ˆβˆ£0,πšΊπ›ˆβˆ£0).\begin{equation} \boldsymbol{\eta}_{0} \sim \mathcal{N} \left( \boldsymbol{\mu}_{\boldsymbol{\eta} \mid 0}, \boldsymbol{\Sigma}_{\boldsymbol{\eta} \mid 0} \right) . \end{equation}

π›π›ˆβˆ£0\boldsymbol{\mu}_{\boldsymbol{\eta} \mid 0} and πšΊπ›ˆβˆ£0\boldsymbol{\Sigma}_{\boldsymbol{\eta} \mid 0} are functions of 𝛂\boldsymbol{\alpha} and 𝛃\boldsymbol{\beta}.

Let the transition matrix 𝛃\boldsymbol{\beta} when X=0X = 0 be

(0.5000.5).\begin{equation} \left( \begin{array}{cc} 0.5 & 0 \\ 0 & 0.5 \\ \end{array} \right) . \end{equation}

Let the transition matrix 𝛃\boldsymbol{\beta} when X=1X = 1 be

(0.75000.75).\begin{equation} \left( \begin{array}{cc} 0.75 & 0 \\ 0 & 0.75 \\ \end{array} \right) . \end{equation}

Let the covariance matrix be

(0.020.01000.010.01500000.010.005000.0050.015).\begin{equation} \left( \begin{array}{cccc} 0.02 & 0.01 & 0 & 0 \\ 0.01 & 0.015 & 0 & 0 \\ 0 & 0 & 0.01 & 0.005 \\ 0 & 0 & 0.005 & 0.015 \\ \end{array} \right) . \end{equation}

Let the intercept vector 𝛂\boldsymbol{\alpha} be fixed to a zero vector.

The SimNuN and SimBetaN functions from the simStateSpace package generate random intercept vectors and transition matrices from the multivariate normal distribution. Note that the SimBetaN function generates transition matrices that are weakly stationary with an option to set lower and upper bounds.

Let the dynamic process noise 𝚿\boldsymbol{\Psi} be given by

𝚿=(0.2βˆ’0.05βˆ’0.050.18).\begin{equation} \boldsymbol{\Psi} = \left( \begin{array}{cc} 0.2 & -0.05 \\ -0.05 & 0.18 \\ \end{array} \right) . \end{equation}

R Function Arguments

n
#> [1] 1000
time
#> [1] 11000
burnin
#> [1] 10000
# first mu0 in the list of length n
mu0[[1]]
#> [1] 0 0
# first sigma0 in the list of length n
sigma0[[1]]
#>              [,1]         [,2]
#> [1,]  0.262246668 -0.001346401
#> [2,] -0.001346401  0.308495216
# first sigma0_l in the list of length n
sigma0_l[[1]] # sigma0_l <- t(chol(sigma0))
#>              [,1]      [,2]
#> [1,]  0.512100252 0.0000000
#> [2,] -0.002629174 0.5554172
alpha
#> [[1]]
#> [1] 0 0
# first beta in the list of length n
beta[[1]]
#>            [,1]     [,2]
#> [1,] 0.42483430 0.221745
#> [2,] 0.04454242 0.644272
# first psi in the list of length n
psi[[1]]
#>       [,1]  [,2]
#> [1,]  0.20 -0.05
#> [2,] -0.05  0.18
psi_l[[1]] # psi_l <- t(chol(psi))
#>            [,1]      [,2]
#> [1,]  0.4472136 0.0000000
#> [2,] -0.1118034 0.4092676
# first nu in the list of length n
nu[[1]]
#> [1]  0.2385858 -0.4148773
lambda
#> [[1]]
#>      [,1] [,2]
#> [1,]    1    0
#> [2,]    0    1
# first theta in the list of length n
theta[[1]]
#>      [,1] [,2]
#> [1,]  0.5  0.0
#> [2,]  0.0  0.5
theta_l[[1]] # theta_l <- t(chol(theta))
#>           [,1]      [,2]
#> [1,] 0.7071068 0.0000000
#> [2,] 0.0000000 0.7071068

Visualizing the Dynamics Without Process Noise and Measurement Error (n = 5 with Different Initial Condition)

X=0X = 0

X=1X = 1

Using the SimSSMIVary Function from the simStateSpace Package to Simulate Data

library(simStateSpace)
sim <- SimSSMIVary(
  n = n,
  time = time,
  mu0 = mu0,
  sigma0_l = sigma0_l,
  alpha = alpha,
  beta = beta,
  psi_l = psi_l,
  nu = nu,
  lambda = lambda,
  theta_l = theta_l
)
data <- as.data.frame(sim, burnin = burnin)
head(data)
#>   id time         y1         y2
#> 1  1    0  0.2872498 -0.6916122
#> 2  1    1  0.2706470 -1.9931501
#> 3  1    2 -0.3722643 -1.7091924
#> 4  1    3 -0.9400761 -0.6043939
#> 5  1    4  0.1432300 -0.1997853
#> 6  1    5 -0.8617044 -1.4859587
plot(sim, burnin = burnin)

Model Fitting

The FitDTVARMxID function fits a DT-VAR model on each individual ii. To set up the estimation, we first provide starting values for each parameter matrix.

Autoregressive Parameters (beta)

We initialize the autoregressive coefficient matrix 𝛃\boldsymbol{\beta} with the true values used in simulation.

beta_values <- beta

Intercepts (nu)

The intercept vector π›Ž\boldsymbol{\nu} is initialized with starting values.

nu_values <- nu

LDL’-parameterized covariance matrices

Covariances such as psi and theta are estimated using the LDL’ decomposition of a positive definite covariance matrix. The decomposition expresses a covariance matrix Ξ£\Sigma as

𝚺=(𝐋+𝐈)diag(Softplus(𝐝uc))(𝐋+𝐈)β€²,\begin{equation} \boldsymbol{\Sigma} = \left( \mathbf{L} + \mathbf{I} \right) \mathrm{diag} \left( \mathrm{Softplus} \left( \mathbf{d}_{uc} \right) \right) \left( \mathbf{L} + \mathbf{I} \right)^{\prime}, \end{equation}

where:

  • 𝐋\mathbf{L} is a strictly lower-triangular matrix of free parameters (l_mat_strict),
  • 𝐈\mathbf{I} is the identity matrix,
  • 𝐝uc\mathbf{d}_{uc} is an unconstrained vector,
  • Softplus(𝐝uc)=log⁑(1+exp(𝐝uc))\mathrm{Softplus} \left(\mathbf{d}_{uc} \right) = \log \left(1 + \exp \left( \mathbf{d}_{uc} \right) \right) ensures strictly positive diagonal entries.

The LDL() function extracts this decomposition from a positive definite covariance matrix. It returns:

  • d_uc: unconstrained diagonal parameters, equal to InvSoftplus(d_vec),
  • d_vec: diagonal entries, equal to Softplus(d_uc),
  • l_mat_strict: the strictly lower-triangular factor.
sigma <- matrix(
  data = c(1.0, 0.5, 0.5, 1.0),
  nrow = 2,
  ncol = 2
)

ldl_sigma <- LDL(sigma)
d_uc <- ldl_sigma$d_uc
l_mat_strict <- ldl_sigma$l_mat_strict
I <- diag(2)
sigma_reconstructed <- (l_mat_strict + I) %*% diag(log1p(exp(d_uc)), 2) %*% t(l_mat_strict + I)
sigma_reconstructed
#>      [,1] [,2]
#> [1,]  1.0  0.5
#> [2,]  0.5  1.0

Process Noise Covariance Matrix (psi)

Starting values for the process noise covariance matrix 𝚿\boldsymbol{\Psi} are given below, with corresponding LDL’ parameters.

psi_values <- psi[[1]]
ldl_psi_values <- LDL(psi_values)
psi_d_values <- ldl_psi_values$d_uc
psi_l_values <- ldl_psi_values$l_mat_strict
psi_d_values
#> [1] -1.507772 -1.701853
psi_l_values
#>       [,1] [,2]
#> [1,]  0.00    0
#> [2,] -0.25    0

Measurement Error Covariance Matrix (theta)

Starting values for the measurement error covariance matrix 𝚯\boldsymbol{\Theta} are given below, with corresponding LDL’ parameters.

theta_values <- theta[[1]]
ldl_theta_values <- LDL(theta_values)
theta_d_values <- ldl_theta_values$d_uc
theta_l_values <- ldl_theta_values$l_mat_strict
theta_d_values
#> [1] -0.4327521 -0.4327521
theta_l_values
#>      [,1] [,2]
#> [1,]    0    0
#> [2,]    0    0

Initial mean vector (mu_0) and covariance matrix (sigma_0)

The initial mean vector π›πŸŽ\boldsymbol{\mu_0} and covariance matrix 𝚺𝟎\boldsymbol{\Sigma_0} are fixed using mu0 and sigma0.

mu0_values <- mu0
sigma0_values <- lapply(
  X = sigma0,
  FUN = LDL
)
sigma0_d_values <- lapply(
  X = sigma0_values,
  FUN = function(i) {
    i$d_uc
  }
)
sigma0_l_values <- lapply(
  X = sigma0_values,
  FUN = function(i) {
    i$l_mat_strict
  }
)

FitDTVARMxID

fit <- FitDTVARMxID(
  data = data,
  observed = c("y1", "y2"),
  id = "id",
  beta_values = beta_values,
  psi_d_values = psi_d_values,
  psi_l_values = psi_l_values,
  nu_values = nu_values,
  theta_d_values = theta_d_values,
  mu0_values = mu0_values,
  sigma0_d_values = sigma0_d_values,
  sigma0_l_values = sigma0_l_values,
  ncores = parallel::detectCores()
)

Parameter estimates

head(summary(fit))
#>                              beta_1_1    beta_2_1     beta_1_2  beta_2_2
#> FitDTVARMxID_DTVAR_ID1.Rds 0.33644408 -0.03209863  0.318846292 0.6807778
#> FitDTVARMxID_DTVAR_ID2.Rds 0.62567783 -0.17846007  0.123453552 0.6296121
#> FitDTVARMxID_DTVAR_ID3.Rds 0.09819451  0.08962127 -0.002754802 0.4383317
#> FitDTVARMxID_DTVAR_ID4.Rds 0.28742898 -0.03281429 -0.169973672 0.6842083
#> FitDTVARMxID_DTVAR_ID5.Rds 0.08558152 -0.07288266 -0.267141770 0.4906759
#> FitDTVARMxID_DTVAR_ID6.Rds 0.22670586  0.06997922  0.019772706 0.7480872
#>                                nu_1_1     nu_2_1   psi_l_2_1   psi_d_1_1
#> FitDTVARMxID_DTVAR_ID1.Rds  0.2583896 -0.3564194 -0.16301521 -1.08509141
#> FitDTVARMxID_DTVAR_ID2.Rds  0.2656604 -0.4698957 -0.28730189 -1.52500886
#> FitDTVARMxID_DTVAR_ID3.Rds  0.2478289 -0.3466180 -0.11594453  0.14494750
#> FitDTVARMxID_DTVAR_ID4.Rds  0.5153719 -0.9226855 -0.10097599 -0.79071180
#> FitDTVARMxID_DTVAR_ID5.Rds  1.1084806 -0.6444617 -0.06681118  0.05789134
#> FitDTVARMxID_DTVAR_ID6.Rds -0.3088867 -0.3694615 -0.01724393 -0.42154417
#>                            psi_d_2_1 theta_d_1_1 theta_d_2_1
#> FitDTVARMxID_DTVAR_ID1.Rds -1.945558  -0.4447790  -0.4494438
#> FitDTVARMxID_DTVAR_ID2.Rds -1.745820  -0.3231276  -0.4200812
#> FitDTVARMxID_DTVAR_ID3.Rds -1.600583 -15.4682616  -0.4306897
#> FitDTVARMxID_DTVAR_ID4.Rds -1.481722  -0.8214105  -0.5045569
#> FitDTVARMxID_DTVAR_ID5.Rds -1.672542 -15.9901651  -0.4509705
#> FitDTVARMxID_DTVAR_ID6.Rds -2.211068  -1.3495034  -0.4493015

Proportion of converged cases

converged(
  fit,
  theta_tol = 0.01,
  prop = TRUE
)
#> [1] 0.911

Fixed-Effect Meta-Analysis of Measurement Error

When fitting DT-VAR models per person, separating process noise (𝚿\boldsymbol{\Psi}) from measurement error (𝚯\boldsymbol{\Theta}) can be unstable for some individuals. To stabilize inference, we first pool the person-level 𝚯i\boldsymbol{\Theta}_{i} estimates from only the converged fits using a fixed-effect meta-analysis. This yields a high-precision estimate of the common measurement-error covariance that we will then hold fixed in a second pass of model fitting.

What the code does: - Selects individuals that converged and whose 𝚯i\boldsymbol{\Theta}_i diagonals exceed a small threshold (theta_tol), filtering out near-zero or ill-conditioned solutions. - Extracts each person’s LDL’ diagonal parameters for 𝚯i\boldsymbol{\Theta}_i and their sampling covariance matrices. - Computes the inverse-variance-weighted pooled estimate (fixed effect), returning it on the same LDL’ parameterization used by FitDTVARMxID().

library(metaVAR)
fixed_theta <- MetaVARMx(
  fit,
  random = FALSE, # TRUE by default
  effects = FALSE, # TRUE by default
  cov_meas = TRUE, # FALSE by default
  theta_tol = 0.01,
  ncores = parallel::detectCores()
)

You can read summary(fixed_theta) as providing the pooled (fixed) measurement-error scale that is common across persons. If individual instruments truly share the same reliability structure, fixing 𝚯\boldsymbol{\Theta} to this pooled value improves stability and often reduces bias in the dynamic parameters.

Note: Fixed-effect pooling assumes a common 𝚯\boldsymbol{\Theta} across individuals.

coef(fixed_theta)
#>  alpha_1_1  alpha_2_1 
#> -0.3800600 -0.3939168
summary(fixed_theta)
#> [1] 0
#> Call:
#> MetaVARMx(object = fit, random = FALSE, effects = FALSE, cov_meas = TRUE, 
#>     theta_tol = 0.01, ncores = parallel::detectCores())
#> 
#> CI type = "normal"
#>                est     se        z p    2.5%   97.5%
#> alpha[1,1] -0.3801 0.0045 -84.0134 0 -0.3889 -0.3712
#> alpha[2,1] -0.3939 0.0043 -90.9131 0 -0.4024 -0.3854
theta_d_values <- coef(fixed_theta)

Refit the model with fixed measurement error covariance matrix

We refit the individual models using the pooled 𝚯\boldsymbol{\Theta} as a fixed measurement-error covariance matrix.

fit <- FitDTVARMxID(
  data = data,
  observed = c("y1", "y2"),
  id = "id",
  beta_values = beta_values,
  psi_d_values = psi_d_values,
  psi_l_values = psi_l_values,
  nu_values = nu_values,
  theta_fixed = TRUE,
  theta_d_values = theta_d_values,
  mu0_values = mu0_values,
  sigma0_d_values = sigma0_d_values,
  sigma0_l_values = sigma0_l_values,
  ncores = parallel::detectCores()
)

With 𝚯\boldsymbol{\Theta} fixed, the re-estimation focuses on the dynamic structure (𝛃\boldsymbol{\beta}, 𝚿\boldsymbol{\Psi}) and intercepts (π›Ž\boldsymbol{\nu}). In practice, this often increases the proportion of converged fits and yields more stable cross-lag estimates.

Proportion of converged cases

converged(
  fit,
  prop = TRUE
)
#> Error in `x$output`:
#> ! $ operator is invalid for atomic vectors

Mixed-Effects Meta-Analysis of Person-Specific Dynamics and Means

Having stabilized 𝚯\boldsymbol{\Theta}, we synthesize the person-specific estimates to recover population-level effects, between-person variability, and systematic covariate-related differences. We fit a mixed-effects meta-analytic model in which each individual’s estimate is weighted by its within-person sampling uncertainty, random effects capture residual heterogeneity across individuals, and fixed effects quantify the association between covariate XX and the person-specific dynamic parameters.

mixed <- MetaVARMx(
  fit,
  x = x,
  effects = TRUE,
  int_meas = TRUE,
  robust_v = FALSE,
  robust = TRUE,
  ncores = parallel::detectCores()
)
#> Error in `x$output`:
#> ! $ operator is invalid for atomic vectors
summary(mixed)
#> Error:
#> ! object 'mixed' not found

Normal Theory Confidence Intervals

confint(mixed, level = 0.95, lb = FALSE)
#> Error:
#> ! object 'mixed' not found
confint(mixed, level = 0.99, lb = FALSE)
#> Error:
#> ! object 'mixed' not found

Robust Confidence Intervals

confint(mixed, level = 0.95, lb = FALSE, robust = TRUE)
#> Error:
#> ! object 'mixed' not found
confint(mixed, level = 0.99, lb = FALSE, robust = TRUE)
#> Error:
#> ! object 'mixed' not found

Profile-Likelihood Confidence Intervals

confint(mixed, level = 0.95, lb = TRUE)
#> Error:
#> ! object 'mixed' not found
confint(mixed, level = 0.99, lb = TRUE)
#> Error:
#> ! object 'mixed' not found
  • The fixed part of the random-effects model gives pooled means 𝛂=𝔼[Vec(𝛃),π›Ž]\boldsymbol{\alpha} = \mathbb{E} \left[ \mathrm{Vec} \left( \boldsymbol{\beta} \right), \boldsymbol{\nu} \right].
  • The random part yields between-person covariances (𝛕2\boldsymbol{\tau}^{2}) quantifying heterogeneity in dynamics (𝛃\boldsymbol{\beta}) and means (π›Ž\boldsymbol{\nu}) across individuals.
means <- extract(mixed, what = "alpha")
#> Error:
#> ! object 'mixed' not found
means
#> Error:
#> ! object 'means' not found
covariances <- extract(mixed, what = "tau_sqr")
#> Error:
#> ! object 'mixed' not found
covariances
#> Error:
#> ! object 'covariances' not found

Finally, we compare the meta-analytic population estimates to the known generating values.

beta_pop_mean
#> [1]  0.608857758 -0.007162951 -0.003195778  0.618151352
beta_pop_cov
#>              [,1]          [,2]         [,3]          [,4]
#> [1,]  0.031250377  0.0084594085 -0.001357726  0.0126662858
#> [2,]  0.008459408  0.0139070808 -0.001129366 -0.0006591882
#> [3,] -0.001357726 -0.0011293659  0.010097588  0.0047962721
#> [4,]  0.012666286 -0.0006591882  0.004796272  0.0281857098
nu_mu
#> [1]  0.625 -0.625
nu_sigma
#>       [,1]  [,2]
#> [1,]  0.10 -0.05
#> [2,] -0.05  0.10

Summary

This vignette demonstrates a two-stage hierarchical estimation approach for dynamic systems: 1. Individual-level DT-VAR estimation with stabilized measurement error. 2. Population-level meta-analysis of person-specific dynamics and means. 3. Estimation and interpretation of covariate effects, where XX predicts systematic between-person differences in dynamics and baseline levels.

References

Hunter, M. D. (2017). State space modeling in an open source, modular, structural equation modeling environment. Structural Equation Modeling: A Multidisciplinary Journal, 25(2), 307–324. https://doi.org/10.1080/10705511.2017.1369354
Neale, M. C., Hunter, M. D., Pritikin, J. N., Zahery, M., Brick, T. R., Kirkpatrick, R. M., Estabrook, R., Bates, T. C., Maes, H. H., & Boker, S. M. (2015). OpenMx 2.0: Extended structural equation and statistical modeling. Psychometrika, 81(2), 535–549. https://doi.org/10.1007/s11336-014-9435-8
R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/