Fit the Continuous-Time Vector Autoregressive Model Using the OpenMx Package
Ivan Jacob Agaloos Pesigan
2025-01-18
Source:vignettes/fit-ct-var-mx.Rmd
fit-ct-var-mx.Rmd
Data Generation Using the SimSSMOUFixed
Function from
the simStateSpace
Package
n
#> [1] 50
time
#> [1] 100
delta_t
#> [1] 0.1
mu0
#> [1] 0 0 0
sigma0
#> [,1] [,2] [,3]
#> [1,] 1.0 0.2 0.2
#> [2,] 0.2 1.0 0.2
#> [3,] 0.2 0.2 1.0
sigma0_l # sigma0_l <- t(chol(sigma0))
#> [,1] [,2] [,3]
#> [1,] 1.0 0.0000000 0.0000000
#> [2,] 0.2 0.9797959 0.0000000
#> [3,] 0.2 0.1632993 0.9660918
mu
#> [1] 0 0 0
phi
#> [,1] [,2] [,3]
#> [1,] -0.357 0.000 0.000
#> [2,] 0.771 -0.511 0.000
#> [3,] -0.450 0.729 -0.693
sigma
#> [,1] [,2] [,3]
#> [1,] 0.24455556 0.02201587 -0.05004762
#> [2,] 0.02201587 0.07067800 0.01539456
#> [3,] -0.05004762 0.01539456 0.07553061
sigma_l # sigma_l <- t(chol(sigma))
#> [,1] [,2] [,3]
#> [1,] 0.49452559 0.0000000 0.000000
#> [2,] 0.04451917 0.2620993 0.000000
#> [3,] -0.10120330 0.0759256 0.243975
nu
#> [1] 0 0 0
lambda
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
theta
#> [,1] [,2] [,3]
#> [1,] 0.2 0.0 0.0
#> [2,] 0.0 0.2 0.0
#> [3,] 0.0 0.0 0.2
theta_l # theta_l <- t(chol(theta))
#> [,1] [,2] [,3]
#> [1,] 0.4472136 0.0000000 0.0000000
#> [2,] 0.0000000 0.4472136 0.0000000
#> [3,] 0.0000000 0.0000000 0.4472136
library(simStateSpace)
sim <- SimSSMOUFixed(
n = n,
time = time,
delta_t = delta_t,
mu0 = mu0,
sigma0_l = sigma0_l,
mu = mu,
phi = phi,
sigma_l = sigma_l,
nu = nu,
lambda = lambda,
theta_l = theta_l,
type = 0
)
data <- as.data.frame(sim)
colnames(data) <- c("id", "time", "x", "m", "y")
head(data)
#> id time x m y
#> 1 1 0.0 -0.3504435 0.41877429 2.611996
#> 2 1 0.1 -0.5920330 1.07433208 1.669272
#> 3 1 0.2 -0.7619855 1.21483834 2.369837
#> 4 1 0.3 -1.6964652 0.21209722 2.128531
#> 5 1 0.4 -1.2282686 0.09950326 1.891140
#> 6 1 0.5 0.1433985 0.66784226 2.036033
Model Fitting
We use the OpenMx
package to fit the continuous-time
vector autoregressive model.
Prepare the Initial Condition
mu0 <- mxMatrix(
type = "Full",
nrow = 3,
ncol = 1,
free = TRUE,
values = matrix(
data = c(
0, 0, 0
),
nrow = 3,
ncol = 1
),
labels = matrix(
data = c(
"mu0_1_1", "mu0_2_1", "mu0_3_1"
),
nrow = 3,
ncol = 1
),
lbound = NA,
ubound = NA,
byrow = FALSE,
dimnames = list(
c("eta_x", "eta_m", "eta_y"),
"mu0"
),
name = "mu0"
)
sigma0 <- mxMatrix(
type = "Symm",
nrow = 3,
ncol = 3,
free = TRUE,
values = matrix(
data = c(
1.0, 0.2, 0.2,
0.2, 1.0, 0.2,
0.2, 0.2, 1.0
),
nrow = 3,
ncol = 3
),
labels = matrix(
data = c(
"sigma0_1_1", "sigma0_2_1", "sigma0_3_1",
"sigma0_2_1", "sigma0_2_2", "sigma0_3_2",
"sigma0_3_1", "sigma0_3_2", "sigma0_3_3"
),
nrow = 3,
ncol = 3
),
lbound = matrix(
data = c(
0, NA, NA,
NA, 0, NA,
NA, NA, 0
),
nrow = 3,
ncol = 3
),
ubound = NA,
byrow = FALSE,
dimnames = list(
c("eta_x", "eta_m", "eta_y"),
c("eta_x", "eta_m", "eta_y")
),
name = "sigma0"
)
Prepare the Dynamic Model
phi <- mxMatrix(
type = "Full",
nrow = 3,
ncol = 3,
free = TRUE,
values = matrix(
data = c(
-0.2, 0.0, 0.0,
0.0, -0.2, 0.0,
0.0, 0.0, -0.2
),
nrow = 3,
ncol = 3
),
labels = matrix(
data = c(
"phi_1_1", "phi_2_1", "phi_3_1",
"phi_1_2", "phi_2_2", "phi_3_2",
"phi_1_3", "phi_2_3", "phi_3_3"
),
nrow = 3,
ncol = 3
),
lbound = -1.5,
ubound = 1.5,
byrow = FALSE,
dimnames = list(
c("eta_x", "eta_m", "eta_y"),
c("eta_x", "eta_m", "eta_y")
),
name = "phi"
)
Prepare the Noise Matrices
sigma <- mxMatrix(
type = "Symm",
nrow = 3,
ncol = 3,
free = TRUE,
values = 0.2 * diag(3),
labels = matrix(
data = c(
"sigma_1_1", "sigma_2_1", "sigma_3_1",
"sigma_2_1", "sigma_2_2", "sigma_3_2",
"sigma_3_1", "sigma_3_2", "sigma_3_3"
),
nrow = 3,
ncol = 3
),
lbound = matrix(
data = c(
0, NA, NA,
NA, 0, NA,
NA, NA, 0
),
nrow = 3,
ncol = 3
),
ubound = NA,
byrow = FALSE,
dimnames = list(
c("eta_x", "eta_m", "eta_y"),
c("eta_x", "eta_m", "eta_y")
),
name = "sigma"
)
theta <- mxMatrix(
type = "Diag",
nrow = 3,
ncol = 3,
free = TRUE,
values = 0.2 * diag(3),
labels = matrix(
data = c(
"theta_1_1", "fixed", "fixed",
"fixed", "theta_2_2", "fixed",
"fixed", "fixed", "theta_3_3"
),
nrow = 3,
ncol = 3
),
lbound = matrix(
data = c(
0, NA, NA,
NA, 0, NA,
NA, NA, 0
),
nrow = 3,
ncol = 3
),
ubound = NA,
byrow = FALSE,
dimnames = list(
c("x", "m", "y"),
c("x", "m", "y")
),
name = "theta"
)
Prepare Miscellaneous Matrices
time <- mxMatrix(
type = "Full",
nrow = 1,
ncol = 1,
free = FALSE,
labels = "data.time",
name = "time"
)
gamma <- mxMatrix(
type = "Zero",
nrow = 3,
ncol = 1,
name = "gamma"
)
kappa <- mxMatrix(
type = "Zero",
nrow = 3,
ncol = 1,
name = "kappa"
)
covariate <- mxMatrix(
type = "Zero",
nrow = 1,
ncol = 1,
name = "covariate"
)
Prepare the Model
In this parameterization, we fit the same model to all individuals
(id
) using a multi-group framework, assuming that the
parameters remain fixed across individuals.
model <- mxModel(
model = "CTVAR",
phi,
gamma,
lambda,
kappa,
sigma,
theta,
mu0,
sigma0,
covariate,
time,
mxExpectationStateSpaceContinuousTime(
A = "phi",
B = "gamma",
C = "lambda",
D = "kappa",
Q = "sigma",
R = "theta",
x0 = "mu0",
P0 = "sigma0",
u = "covariate",
t = "time",
dimnames = c("x", "m", "y")
),
mxFitFunctionML(),
mxData(
observed = data,
type = "raw"
)
)
ids <- sort(
unique(data[, "id"])
)
model_id <- lapply(
X = ids,
FUN = function(i,
data,
model) {
return(
mxModel(
name = paste0("CTVAR", "_", i),
model = model,
mxData(
observed = data[
which(
data[, "id"] == i
), ,
drop = FALSE
],
type = "raw"
)
)
)
},
data = data,
model = model
)
Fit the Model
fit <- mxTryHardctsem(
model = mxModel(
name = "CTVAR",
model_id,
mxFitFunctionMultigroup(
paste0(
"CTVAR",
"_",
ids
)
)
),
extraTries = 1000
)
#> Running CTVAR with 27 parameters
#>
#> Beginning initial fit attempt
#> Running CTVAR with 27 parameters
#>
#> Lowest minimum so far: 21626.5696149473
#>
#> Solution found
#>
#> Solution found! Final fit=21626.57 (started at 22577.553) (1 attempt(s): 1 valid, 0 errors)
#> Start values from best fit:
#> -0.293790977184311,0.824373596793956,-0.454352942782624,-0.0719257333908259,-0.568941561106352,0.707694577826676,0.0257889208202681,0.0826903190175992,-0.687497461963515,0.230160009853211,0.0279936282895708,0.0788922447163538,-0.0678961700430469,0.00451046215224979,0.0843652757698069,0.201040220854235,0.191651067931051,0.197460049266135,-0.06844430614785,0.0846200049615241,0.11577024893487,0.942751969308445,0.161848184696176,1.4897646946326,0.103298448260435,-0.100426750441556,0.946206282100809
summary(fit)
#> Summary of CTVAR
#>
#> free parameters:
#> name matrix row col Estimate Std.Error A lbound
#> 1 phi_1_1 CTVAR_1.phi eta_x eta_x -0.293790977 0.082131220 -1.5
#> 2 phi_2_1 CTVAR_1.phi eta_m eta_x 0.824373597 0.056712190 -1.5
#> 3 phi_3_1 CTVAR_1.phi eta_y eta_x -0.454352943 0.057712619 -1.5
#> 4 phi_1_2 CTVAR_1.phi eta_x eta_m -0.071925733 0.068460953 -1.5
#> 5 phi_2_2 CTVAR_1.phi eta_m eta_m -0.568941561 0.048328345 -1.5
#> 6 phi_3_2 CTVAR_1.phi eta_y eta_m 0.707694578 0.048682892 -1.5
#> 7 phi_1_3 CTVAR_1.phi eta_x eta_y 0.025788921 0.062371709 -1.5
#> 8 phi_2_3 CTVAR_1.phi eta_m eta_y 0.082690319 0.043347036 -1.5
#> 9 phi_3_3 CTVAR_1.phi eta_y eta_y -0.687497462 0.044106637 -1.5
#> 10 sigma_1_1 CTVAR_1.sigma eta_x eta_x 0.230160010 0.022629412 0
#> 11 sigma_2_1 CTVAR_1.sigma eta_x eta_m 0.027993628 0.009999226
#> 12 sigma_2_2 CTVAR_1.sigma eta_m eta_m 0.078892245 0.009570698 0
#> 13 sigma_3_1 CTVAR_1.sigma eta_x eta_y -0.067896170 0.010706785
#> 14 sigma_3_2 CTVAR_1.sigma eta_m eta_y 0.004510462 0.006768976
#> 15 sigma_3_3 CTVAR_1.sigma eta_y eta_y 0.084365276 0.010385763 0
#> 16 theta_1_1 CTVAR_1.theta x x 0.201040221 0.005103784 0
#> 17 theta_2_2 CTVAR_1.theta m m 0.191651068 0.004371682 0
#> 18 theta_3_3 CTVAR_1.theta y y 0.197460049 0.004520322 0
#> 19 mu0_1_1 CTVAR_1.mu0 eta_x mu0 -0.068444306 0.141833181
#> 20 mu0_2_1 CTVAR_1.mu0 eta_m mu0 0.084620005 0.175303157
#> 21 mu0_3_1 CTVAR_1.mu0 eta_y mu0 0.115770249 0.141100567
#> 22 sigma0_1_1 CTVAR_1.sigma0 eta_x eta_x 0.942751969 0.202350021 0
#> 23 sigma0_2_1 CTVAR_1.sigma0 eta_x eta_m 0.161848185 0.178506451
#> 24 sigma0_2_2 CTVAR_1.sigma0 eta_m eta_m 1.489764695 0.309416239 0
#> 25 sigma0_3_1 CTVAR_1.sigma0 eta_x eta_y 0.103298448 0.143255187 !
#> 26 sigma0_3_2 CTVAR_1.sigma0 eta_m eta_y -0.100426750 0.177014576 !
#> 27 sigma0_3_3 CTVAR_1.sigma0 eta_y eta_y 0.946206282 0.201001057 ! 0
#> ubound
#> 1 1.5
#> 2 1.5
#> 3 1.5
#> 4 1.5
#> 5 1.5
#> 6 1.5
#> 7 1.5
#> 8 1.5
#> 9 1.5
#> 10
#> 11
#> 12
#> 13
#> 14
#> 15
#> 16
#> 17
#> 18
#> 19
#> 20
#> 21
#> 22
#> 23
#> 24
#> 25
#> 26
#> 27
#>
#> Model Statistics:
#> | Parameters | Degrees of Freedom | Fit (-2lnL units)
#> Model: 27 14973 21626.57
#> Saturated: NA NA NA
#> Independence: NA NA NA
#> Number of observations/statistics: 5000/15000
#>
#> Information Criteria:
#> | df Penalty | Parameters Penalty | Sample-Size Adjusted
#> AIC: -8319.43 21680.57 21680.87
#> BIC: -105901.36 21856.53 21770.74
#> CFI: NA
#> TLI: 1 (also known as NNFI)
#> RMSEA: 0 [95% CI (NA, NA)]
#> Prob(RMSEA <= 0.05): NA
#> To get additional fit indices, see help(mxRefModels)
#> timestamp: 2025-01-19 00:03:08
#> Wall clock time: 211.1898 secs
#> optimizer: SLSQP
#> OpenMx version number: 2.21.13
#> Need help? See help(mxSummary)
coefs <- coef(fit)
vcovs <- vcov(fit)
Extract Matrices from the Fitted Model to use in cTMed
phi_names <- c(
"phi_1_1", "phi_2_1", "phi_3_1",
"phi_1_2", "phi_2_2", "phi_3_2",
"phi_1_3", "phi_2_3", "phi_3_3"
)
sigma_names <- c(
"sigma_1_1", "sigma_2_1", "sigma_3_1",
"sigma_2_1", "sigma_2_2", "sigma_3_2",
"sigma_3_1", "sigma_3_2", "sigma_3_3"
)
sigma_vech_names <- c(
"sigma_1_1", "sigma_2_1", "sigma_3_1",
"sigma_2_2", "sigma_3_2",
"sigma_3_3"
)
theta_names <- c(
"phi_1_1", "phi_2_1", "phi_3_1",
"phi_1_2", "phi_2_2", "phi_3_2",
"phi_1_3", "phi_2_3", "phi_3_3",
"sigma_1_1", "sigma_2_1", "sigma_3_1",
"sigma_2_2", "sigma_3_2",
"sigma_3_3"
)
phi <- matrix(
data = coefs[phi_names],
nrow = 3,
ncol = 3
)
sigma <- matrix(
data = coefs[sigma_names],
nrow = 3,
ncol = 3
)
theta <- coefs[theta_names]
vcov_phi_vec <- vcovs[phi_names, phi_names]
vcov_sigma_vech <- vcovs[sigma_vech_names, sigma_vech_names]
vcov_theta <- vcovs[theta_names, theta_names]
Estimated Drift Matrix with Corresponding Sampling Covariance Matrix
phi
#> [,1] [,2] [,3]
#> [1,] -0.2937910 -0.07192573 0.02578892
#> [2,] 0.8243736 -0.56894156 0.08269032
#> [3,] -0.4543529 0.70769458 -0.68749746
vcov_phi_vec
#> phi_1_1 phi_2_1 phi_3_1 phi_1_2 phi_2_2
#> phi_1_1 0.0067455373 3.317282e-04 -0.0014367602 -0.0048526817 -2.768309e-04
#> phi_2_1 0.0003317282 3.216272e-03 -0.0001187893 -0.0001307222 -2.404128e-03
#> phi_3_1 -0.0014367602 -1.187893e-04 0.0033307463 0.0009783394 1.079355e-04
#> phi_1_2 -0.0048526817 -1.307222e-04 0.0009783394 0.0046869020 1.925602e-04
#> phi_2_2 -0.0002768309 -2.404128e-03 0.0001079355 0.0001925602 2.335629e-03
#> phi_3_2 0.0010357869 3.898403e-05 -0.0024541083 -0.0009969575 -8.235956e-05
#> phi_1_3 0.0033191641 4.946738e-05 -0.0006122438 -0.0033953975 -8.705324e-05
#> phi_2_3 0.0002242364 1.673695e-03 -0.0001006422 -0.0001920905 -1.714674e-03
#> phi_3_3 -0.0007324751 -7.970003e-06 0.0016913327 0.0007497396 3.129422e-05
#> phi_3_2 phi_1_3 phi_2_3 phi_3_3
#> phi_1_1 1.035787e-03 3.319164e-03 2.242364e-04 -7.324751e-04
#> phi_2_1 3.898403e-05 4.946738e-05 1.673695e-03 -7.970003e-06
#> phi_3_1 -2.454108e-03 -6.122438e-04 -1.006422e-04 1.691333e-03
#> phi_1_2 -9.969575e-04 -3.395397e-03 -1.920905e-04 7.497396e-04
#> phi_2_2 -8.235956e-05 -8.705324e-05 -1.714674e-03 3.129422e-05
#> phi_3_2 2.370024e-03 6.700936e-04 1.029138e-04 -1.736606e-03
#> phi_1_3 6.700936e-04 3.890230e-03 1.809956e-04 -8.698817e-04
#> phi_2_3 1.029138e-04 1.809956e-04 1.878966e-03 -9.767929e-05
#> phi_3_3 -1.736606e-03 -8.698817e-04 -9.767929e-05 1.945395e-03
Process Noise Covariance Matrix with Corresponding Sampling Covariance Matrix
sigma
#> [,1] [,2] [,3]
#> [1,] 0.23016001 0.027993628 -0.067896170
#> [2,] 0.02799363 0.078892245 0.004510462
#> [3,] -0.06789617 0.004510462 0.084365276
vcov_sigma_vech
#> sigma_1_1 sigma_2_1 sigma_3_1 sigma_2_2 sigma_3_2
#> sigma_1_1 5.120903e-04 2.212062e-05 -9.553480e-05 6.950907e-07 -4.527137e-06
#> sigma_2_1 2.212062e-05 9.998452e-05 -7.118632e-06 1.111751e-05 -2.361805e-05
#> sigma_3_1 -9.553480e-05 -7.118632e-06 1.146352e-04 -1.030557e-06 7.394898e-06
#> sigma_2_2 6.950907e-07 1.111751e-05 -1.030557e-06 9.159826e-05 -5.224564e-06
#> sigma_3_2 -4.527137e-06 -2.361805e-05 7.394898e-06 -5.224564e-06 4.581903e-05
#> sigma_3_3 1.719521e-05 3.460633e-06 -4.884301e-05 1.323807e-08 -5.945401e-06
#> sigma_3_3
#> sigma_1_1 1.719521e-05
#> sigma_2_1 3.460633e-06
#> sigma_3_1 -4.884301e-05
#> sigma_2_2 1.323807e-08
#> sigma_3_2 -5.945401e-06
#> sigma_3_3 1.078641e-04
Estimated Drift Matrix and Process Noise Covariance Matrix with Corresponding Sampling Covariance Matrix
theta
#> phi_1_1 phi_2_1 phi_3_1 phi_1_2 phi_2_2 phi_3_2
#> -0.293790977 0.824373597 -0.454352943 -0.071925733 -0.568941561 0.707694578
#> phi_1_3 phi_2_3 phi_3_3 sigma_1_1 sigma_2_1 sigma_3_1
#> 0.025788921 0.082690319 -0.687497462 0.230160010 0.027993628 -0.067896170
#> sigma_2_2 sigma_3_2 sigma_3_3
#> 0.078892245 0.004510462 0.084365276
vcov_theta
#> phi_1_1 phi_2_1 phi_3_1 phi_1_2 phi_2_2
#> phi_1_1 6.745537e-03 3.317282e-04 -1.436760e-03 -4.852682e-03 -2.768309e-04
#> phi_2_1 3.317282e-04 3.216272e-03 -1.187893e-04 -1.307222e-04 -2.404128e-03
#> phi_3_1 -1.436760e-03 -1.187893e-04 3.330746e-03 9.783394e-04 1.079355e-04
#> phi_1_2 -4.852682e-03 -1.307222e-04 9.783394e-04 4.686902e-03 1.925602e-04
#> phi_2_2 -2.768309e-04 -2.404128e-03 1.079355e-04 1.925602e-04 2.335629e-03
#> phi_3_2 1.035787e-03 3.898403e-05 -2.454108e-03 -9.969575e-04 -8.235956e-05
#> phi_1_3 3.319164e-03 4.946738e-05 -6.122438e-04 -3.395397e-03 -8.705324e-05
#> phi_2_3 2.242364e-04 1.673695e-03 -1.006422e-04 -1.920905e-04 -1.714674e-03
#> phi_3_3 -7.324751e-04 -7.970003e-06 1.691333e-03 7.497396e-04 3.129422e-05
#> sigma_1_1 -1.135926e-03 -1.287321e-04 2.704873e-04 6.645507e-04 7.828536e-05
#> sigma_2_1 9.482650e-05 -2.294916e-04 -3.697441e-05 -1.408572e-04 1.215205e-04
#> sigma_3_1 1.231851e-04 1.944905e-05 -2.546840e-04 -1.948356e-05 -4.214459e-06
#> sigma_2_2 1.513404e-05 1.013826e-04 5.265327e-06 -1.698422e-05 -1.365820e-04
#> sigma_3_2 -2.439754e-05 2.731052e-05 5.101169e-05 3.501419e-05 9.131412e-06
#> sigma_3_3 -1.847835e-06 -1.296036e-05 4.433097e-05 -2.033872e-05 5.755900e-06
#> phi_3_2 phi_1_3 phi_2_3 phi_3_3 sigma_1_1
#> phi_1_1 1.035787e-03 3.319164e-03 2.242364e-04 -7.324751e-04 -1.135926e-03
#> phi_2_1 3.898403e-05 4.946738e-05 1.673695e-03 -7.970003e-06 -1.287321e-04
#> phi_3_1 -2.454108e-03 -6.122438e-04 -1.006422e-04 1.691333e-03 2.704873e-04
#> phi_1_2 -9.969575e-04 -3.395397e-03 -1.920905e-04 7.497396e-04 6.645507e-04
#> phi_2_2 -8.235956e-05 -8.705324e-05 -1.714674e-03 3.129422e-05 7.828536e-05
#> phi_3_2 2.370024e-03 6.700936e-04 1.029138e-04 -1.736606e-03 -1.636432e-04
#> phi_1_3 6.700936e-04 3.890230e-03 1.809956e-04 -8.698817e-04 -3.376716e-04
#> phi_2_3 1.029138e-04 1.809956e-04 1.878966e-03 -9.767929e-05 -4.357517e-05
#> phi_3_3 -1.736606e-03 -8.698817e-04 -9.767929e-05 1.945395e-03 8.970662e-05
#> sigma_1_1 -1.636432e-04 -3.376716e-04 -4.357517e-05 8.970662e-05 5.120903e-04
#> sigma_2_1 4.519977e-05 9.543735e-05 -5.425218e-05 -3.058552e-05 2.212062e-05
#> sigma_3_1 1.294832e-04 -9.286613e-05 -1.110211e-05 -3.082170e-05 -9.553480e-05
#> sigma_2_2 -5.210923e-06 1.212395e-05 8.853011e-05 3.283791e-06 6.950907e-07
#> sigma_3_2 -6.830352e-05 -2.747487e-05 -4.766731e-05 4.404841e-05 -4.527137e-06
#> sigma_3_3 2.871678e-05 5.372761e-05 4.398002e-06 -1.163939e-04 1.719521e-05
#> sigma_2_1 sigma_3_1 sigma_2_2 sigma_3_2 sigma_3_3
#> phi_1_1 9.482650e-05 1.231851e-04 1.513404e-05 -2.439754e-05 -1.847835e-06
#> phi_2_1 -2.294916e-04 1.944905e-05 1.013826e-04 2.731052e-05 -1.296036e-05
#> phi_3_1 -3.697441e-05 -2.546840e-04 5.265327e-06 5.101169e-05 4.433097e-05
#> phi_1_2 -1.408572e-04 -1.948356e-05 -1.698422e-05 3.501419e-05 -2.033872e-05
#> phi_2_2 1.215205e-04 -4.214459e-06 -1.365820e-04 9.131412e-06 5.755900e-06
#> phi_3_2 4.519977e-05 1.294832e-04 -5.210923e-06 -6.830352e-05 2.871678e-05
#> phi_1_3 9.543735e-05 -9.286613e-05 1.212395e-05 -2.747487e-05 5.372761e-05
#> phi_2_3 -5.425218e-05 -1.110211e-05 8.853011e-05 -4.766731e-05 4.398002e-06
#> phi_3_3 -3.058552e-05 -3.082170e-05 3.283791e-06 4.404841e-05 -1.163939e-04
#> sigma_1_1 2.212062e-05 -9.553480e-05 6.950907e-07 -4.527137e-06 1.719521e-05
#> sigma_2_1 9.998452e-05 -7.118632e-06 1.111751e-05 -2.361805e-05 3.460633e-06
#> sigma_3_1 -7.118632e-06 1.146352e-04 -1.030557e-06 7.394898e-06 -4.884301e-05
#> sigma_2_2 1.111751e-05 -1.030557e-06 9.159826e-05 -5.224564e-06 1.323807e-08
#> sigma_3_2 -2.361805e-05 7.394898e-06 -5.224564e-06 4.581903e-05 -5.945401e-06
#> sigma_3_3 3.460633e-06 -4.884301e-05 1.323807e-08 -5.945401e-06 1.078641e-04
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/