Inspect model information
Source:R/generics.R, R/generics_lavaan.R, R/generics_modsem_da.R, and 1 more
modsem_inspect.Rdfunction used to inspect fitted object. Similar to lavaan::lavInspect
argument what decides what to inspect
modsem_inspect.modsem_da lets you pull lavaan-style matrices,
optimiser diagnostics, expected moments, or fit measures from a
modsem_da object.
Usage
modsem_inspect(object, what = NULL, ...)
# S3 method for class 'lavaan'
modsem_inspect(object, what = "free", ...)
# S3 method for class 'modsem_da'
modsem_inspect(object, what = NULL, ...)
# S3 method for class 'modsem_pi'
modsem_inspect(object, what = "free", ...)Value
A named list with the extracted information. If a single piece of information is returned, it is returned as is; not as a named element in a list.
Details
For modsem_pi objects, it is just a wrapper for lavaan::lavInspect.
For modsem_da objects an internal function is called, which takes different
keywords for the what argument.
Below is a list of possible values for the what argument,
organised in several sections. Keywords are case-sensitive.
Presets
"default"Everything in Sample information, Optimiser diagnostics Parameter tables, Model matrices, and Expected-moment matrices except the raw
dataslot"coef"Coefficients and variance-covariance matrix of both free and constrained parameters (same as
"coef.all")."coef.all"Coefficients and variance-covariance matrix of both free and constrained parameters (same as
"coef")."coef.free"Coefficients and variance-covariance matrix of the free parameters.
"all"All items listed below, including
data."matrices"The lavaan-style model matrices.
"optim"Only the items under Optimiser diagnostics
.
"fit"A list with
fit.h0,fit.h1, comparative.fit
Sample information:
"N"Number of analysed rows (integer).
"ngroups"Number of groups in model (integer).
"group"Group variable in model (character).
"group.label"Group labels (character).
"ovs"Observed variables used in model (character).
Parameter estimates and standard errors:
"coefficients.free"Free parameter values.
"coefficients.all"Both free and constrained parameter values.
"vcov.free"Variance–covariance of free coefficients only.
"vcov.all"Variance–covariance of both free and constrained coefficients.
Optimiser diagnostics:
"coefficients.free"Free parameter values.
"vcov.free"Variance–covariance of free coefficients only.
"information"Fisher information matrix.
"loglik"Log-likelihood.
"iterations"Optimiser iteration count.
"convergence"TRUE/FALSEindicating whether the model converged."iteration.history"LMS iteration history with mode, log-likelihood, changes, elapsed time, and forecast columns, if available.
Parameter tables:
"partable"Parameter table with estimated parameters.
"partable.input"Parsed model syntax.
Model matrices:
"lambda"Factor loadings.
"theta"Residual covariance matrix for indicators.
"wmat"Composite loading matrix for observed indicators, if present.
"tmat"Composite residual matrix for indicators, if present.
"psi"Residual covariance matrix for latent variables.
"beta"Structural regression matrix among latent variables.
"nu"Intercepts for observed variables.
"alpha"Intercepts for latent variables.
Model-implied matrices:
"cov.ov"Model-implied covariance of observed variables.
"cov.lv"Model-implied covariance of latent variables.
"cov.all"Joint covariance of observed + latent variables.
"cor.ov"Correlation counterpart of
"cov.ov"."cor.lv"Correlation counterpart of
"cov.lv"."cor.all"Correlation counterpart of
"cov.all"."mean.ov"Expected means of observed variables.
"mean.lv"Expected means of latent variables.
"mean.all"Joint mean vector.
R-squared and standardized residual variances:
"r2.all"R-squared values for both observed (i.e., indicators) and latent endogenous variables.
"r2.lv"R-squared values for latent endogenous variables.
"r2.ov"R-squared values for observed (i.e., indicators) variables.
"res.all"Standardized residuals (i.e.,
1 - R^2) for both observed (i.e., indicators) and latent endogenous variables."res.lv"Standardized residuals (i.e.,
1 - R^2) for latent endogenous variables."res.ov"Standardized residuals (i.e.,
1 - R^2) for observed variables (i.e., indicators).
Interaction-specific caveats:
If the model contains an uncentred latent interaction term it is centred internally before any
cov.*,cor.*, ormean.*matrices are calculated.These matrices should not be used to compute fit-statistics (e.g., chi-square and RMSEA) if there is an interaction term in the model.
Examples
# \dontrun{
m1 <- "
# Outer Model
X =~ x1 + x2 + x3
Y =~ y1 + y2 + y3
Z =~ z1 + z2 + z3
# Inner model
Y ~ X + Z + X:Z
"
est <- modsem(m1, oneInt, "lms")
modsem_inspect(est) # everything except "data"
#> $N
#> [1] 2000
#>
#> $vcov.all
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1 z3~1
#> X=~x2 0.000
#> X=~x3 0.000 0.000
#> Z=~z2 0.000 0.000 0.000
#> Z=~z3 0.000 0.000 0.000 0.000
#> Y=~y2 0.000 0.000 0.000 0.000 0.000
#> Y=~y3 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> x2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> z2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~~x1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1 0.001
#> y2~1 0.001 0.001
#> y3~1 0.001 0.001 0.001
#> x1~~x1 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1
#> y2~~y2 0.000
#> y3~~y3 0.000 0.000
#> X~~X 0.000 0.000 0.001
#> X~~Z 0.000 0.000 0.000 0.001
#> Z~~Z 0.000 0.000 0.000 0.000 0.001
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#>
#> $vcov.free
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1 z3~1
#> X=~x2 0.000
#> X=~x3 0.000 0.000
#> Z=~z2 0.000 0.000 0.000
#> Z=~z3 0.000 0.000 0.000 0.000
#> Y=~y2 0.000 0.000 0.000 0.000 0.000
#> Y=~y3 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> x2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> z2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~~x1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1 0.001
#> y2~1 0.001 0.001
#> y3~1 0.001 0.001 0.001
#> x1~~x1 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1
#> y2~~y2 0.000
#> y3~~y3 0.000 0.000
#> X~~X 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.001
#> Z~~Z 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#>
#> $information
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1
#> X=~x2 8936.063
#> X=~x3 -2766.571 8142.638
#> Z=~z2 63.767 74.580 9237.096
#> Z=~z3 72.852 81.804 -3031.226 8774.480
#> Y=~y2 -169.905 -194.400 -158.844 -172.314 23797.096
#> Y=~y3 -176.994 -205.515 -169.933 -183.209 -8378.287 20996.450
#> x1~1 32.516 35.878 91.950 97.584 -121.649 -132.023 8008.419
#> x2~1 26.903 28.127 72.085 76.502 -95.368 -103.501 -3633.364
#> x3~1 28.567 32.913 80.785 85.735 -106.877 -115.993 -4071.860
#> z1~1 91.054 99.144 24.235 28.984 -126.473 -133.370 53.857
#> z2~1 77.075 83.922 20.807 24.534 -107.056 -112.894 45.588
#> z3~1 84.554 92.065 22.505 27.209 -117.444 -123.848 50.012
#> y1~1 -23.969 -26.796 -24.065 -28.563 -592.195 -629.884 -175.948
#> y2~1 -19.786 -22.119 -19.865 -23.578 1375.033 -519.950 -145.240
#> y3~1 -21.041 -23.522 -21.125 -25.074 -519.845 1206.760 -154.452
#> x1~~x1 -1389.947 -1476.349 16.813 27.391 -9.209 -10.067 9.993
#> x2~~x2 2732.443 -906.763 25.269 14.873 -6.019 -13.863 -8.372
#> x3~~x3 -1031.735 2748.595 14.420 17.790 14.596 22.362 -7.393
#> z1~~z1 12.672 13.403 -1310.554 -1439.617 14.792 13.963 39.087
#> z2~~z2 33.356 27.747 2862.218 -1037.980 -2.978 0.285 12.944
#> z3~~z3 24.008 33.465 -1120.634 2990.081 -14.401 -17.544 33.884
#> y1~~y1 1.522 1.020 7.099 5.760 -1488.009 -1620.134 3.522
#> y2~~y2 3.406 -5.469 -12.371 -9.414 3076.460 -1163.047 -11.157
#> y3~~y3 -16.431 -12.864 -8.415 -10.835 -1244.583 2872.689 2.006
#> X~~X 1114.457 1246.319 -50.414 -57.283 62.824 66.086 -5.214
#> X~~Z -118.140 -132.884 111.761 130.414 31.862 34.285 -52.111
#> Z~~Z -26.143 -29.548 1158.216 1268.734 49.083 52.207 -16.739
#> Y~~Y -29.420 -42.719 -33.020 -35.367 551.511 591.811 -12.766
#> Y~X -291.148 -315.639 -39.706 -48.443 435.263 458.806 -72.368
#> Y~Z -63.485 -67.765 -275.766 -285.538 397.180 432.683 -418.653
#> Y~X:Z -292.995 -337.420 -317.224 -347.953 418.275 438.007 -75.993
#> x2~1 x3~1 z1~1 z2~1 z3~1 y1~1 y2~1
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1 9487.389
#> x3~1 -3192.184 8576.430
#> z1~1 42.221 47.317 7692.496
#> z2~1 35.739 40.053 -3640.374 9446.348
#> z3~1 39.207 43.939 -3993.594 -3380.475 8930.971
#> y1~1 -137.937 -154.584 -144.381 -122.215 -134.074 7702.686
#> y2~1 -113.863 -127.604 -119.183 -100.885 -110.674 -3983.851 9665.675
#> y3~1 -121.085 -135.698 -126.742 -107.284 -117.693 -4236.535 -3497.131
#> x1~~x1 7.834 8.780 49.424 41.836 45.895 -7.082 -5.846
#> x2~~x2 -6.563 -7.356 12.126 10.264 11.260 4.722 3.898
#> x3~~x3 -5.796 -6.496 31.335 26.524 29.098 5.565 4.594
#> z1~~z1 30.643 34.341 -7.607 -6.439 -7.064 -1.770 -1.461
#> z2~~z2 10.148 11.373 5.858 4.959 5.440 -2.219 -1.831
#> z3~~z3 26.564 29.770 -6.298 -5.331 -5.848 9.377 7.740
#> y1~~y1 2.761 3.094 -4.870 -4.122 -4.522 -0.198 -0.163
#> y2~~y2 -8.747 -9.802 2.646 2.240 2.457 -0.482 -0.398
#> y3~~y3 1.572 1.762 -3.194 -2.704 -2.966 0.157 0.130
#> X~~X -4.088 -4.581 -30.274 -25.626 -28.112 -2.204 -1.819
#> X~~Z -40.853 -45.784 -39.204 -33.185 -36.405 55.739 46.011
#> Z~~Z -13.123 -14.707 7.282 6.164 6.762 -13.179 -10.879
#> Y~~Y -10.008 -11.216 -13.671 -11.572 -12.695 -1.233 -1.018
#> Y~X -56.734 -63.581 -399.050 -337.785 -370.560 -34.442 -28.431
#> Y~Z -328.208 -367.818 -71.576 -60.587 -66.466 -37.672 -31.097
#> Y~X:Z -59.576 -66.766 -51.143 -43.291 -47.491 129.454 106.861
#> y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1 8511.184
#> x1~~x1 -6.217 15997.375
#> x2~~x2 4.145 3563.719 22472.558
#> x3~~x3 4.885 4024.024 2487.856 18366.467
#> z1~~z1 -1.554 0.169 12.903 20.640 14793.817
#> z2~~z2 -1.948 53.081 -23.376 24.150 3288.419 22302.790
#> z3~~z3 8.231 14.058 43.412 18.089 3968.110 2885.094 19915.270
#> y1~~y1 -0.174 20.324 10.322 16.769 19.203 20.378 35.817
#> y2~~y2 -0.423 6.672 -18.050 28.905 2.797 10.596 -10.398
#> y3~~y3 0.138 9.051 20.620 -4.925 12.881 -7.001 0.503
#> X~~X -1.934 283.346 175.199 234.685 -8.389 -15.364 -7.478
#> X~~Z 48.929 -22.643 -51.766 -62.316 12.753 13.374 -27.387
#> Z~~Z -11.568 -13.518 5.617 8.448 265.550 188.456 237.171
#> Y~~Y -1.082 88.263 34.250 97.153 85.949 57.423 64.332
#> Y~X -30.234 -169.879 -54.700 -127.828 33.558 -16.921 6.833
#> Y~Z -33.069 -24.555 16.825 2.349 -137.718 -41.301 -144.287
#> Y~X:Z 113.639 -102.912 -97.898 -72.604 -101.340 -117.147 -141.262
#> y1~~y1 y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1 14833.394
#> y2~~y2 3729.685 23354.351
#> y3~~y3 4425.376 3353.661 18111.286
#> X~~X -2.196 0.884 4.971 3650.260
#> X~~Z 0.909 0.407 -1.748 -316.379 1818.438
#> Z~~Z -4.845 4.027 4.499 0.560 44.790 3588.577
#> Y~~Y 171.261 79.637 60.812 9.187 -1.195 8.958 760.433
#> Y~X 18.683 -9.432 11.685 116.714 35.875 -2.338 52.717
#> Y~Z -12.438 42.474 -8.669 10.998 59.715 90.433 48.382
#> Y~X:Z -25.459 15.094 54.451 116.208 54.381 111.249 109.983
#> Y~X Y~Z Y~X:Z
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1
#> y2~~y2
#> y3~~y3
#> X~~X
#> X~~Z
#> Z~~Z
#> Y~~Y
#> Y~X 1549.633
#> Y~Z 320.376 1596.307
#> Y~X:Z -64.010 -26.389 1510.270
#>
#> $coefficients.all
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1
#> 0.803 0.914 0.810 0.881 0.798 0.899 1.023 1.215 0.919 1.011 1.206
#> z3~1 y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> 0.916 1.036 1.220 0.953 0.158 0.162 0.165 0.167 0.160 0.158 0.160
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> 0.154 0.164 0.983 0.200 1.018 0.980 0.673 0.569 0.718
#>
#> $coefficients.free
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1
#> 0.803 0.914 0.810 0.881 0.798 0.899 1.023 1.215 0.919 1.011 1.206
#> z3~1 y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> 0.916 1.036 1.220 0.953 0.158 0.162 0.165 0.167 0.160 0.158 0.160
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> 0.154 0.164 0.983 0.200 1.018 0.980 0.673 0.569 0.718
#>
#> $partable
#> lhs op rhs label group est std.error z.value p.value ci.lower ci.upper
#> 1 X =~ x1 1 1.000 NA NA NA NA NA
#> 2 X =~ x2 1 0.803 0.013 63.871 0 0.779 0.828
#> 3 X =~ x3 1 0.914 0.014 67.672 0 0.887 0.940
#> 4 Z =~ z1 1 1.000 NA NA NA NA NA
#> 5 Z =~ z2 1 0.810 0.012 65.057 0 0.786 0.835
#> 6 Z =~ z3 1 0.881 0.013 67.575 0 0.856 0.907
#> 7 Y =~ y1 1 1.000 NA NA NA NA NA
#> 8 Y =~ y2 1 0.798 0.007 107.505 0 0.784 0.813
#> 9 Y =~ y3 1 0.899 0.008 112.529 0 0.884 0.915
#> 10 Y ~ X 1 0.673 0.031 21.672 0 0.612 0.734
#> 11 Y ~ Z 1 0.569 0.030 18.703 0 0.509 0.628
#> 12 Y ~ X:Z 1 0.718 0.028 25.827 0 0.664 0.773
#> 13 x1 ~1 1 1.023 0.024 42.758 0 0.976 1.070
#> 14 x2 ~1 1 1.215 0.020 60.818 0 1.176 1.255
#> 15 x3 ~1 1 0.919 0.022 41.356 0 0.876 0.963
#> 16 z1 ~1 1 1.011 0.024 41.558 0 0.964 1.059
#> 17 z2 ~1 1 1.206 0.020 59.251 0 1.166 1.245
#> 18 z3 ~1 1 0.916 0.022 42.046 0 0.873 0.958
#> 19 y1 ~1 1 1.036 0.033 31.381 0 0.972 1.101
#> 20 y2 ~1 1 1.220 0.027 45.402 0 1.167 1.272
#> 21 y3 ~1 1 0.953 0.030 31.785 0 0.894 1.012
#> 22 x1 ~~ x1 1 0.158 0.009 18.135 0 0.141 0.175
#> 23 x2 ~~ x2 1 0.162 0.007 23.144 0 0.148 0.176
#> 24 x3 ~~ x3 1 0.165 0.008 20.749 0 0.149 0.180
#> 25 z1 ~~ z1 1 0.167 0.009 18.495 0 0.149 0.184
#> 26 z2 ~~ z2 1 0.160 0.007 22.666 0 0.146 0.173
#> 27 z3 ~~ z3 1 0.158 0.008 20.762 0 0.143 0.173
#> 28 y1 ~~ y1 1 0.160 0.009 18.005 0 0.142 0.177
#> 29 y2 ~~ y2 1 0.154 0.007 22.673 0 0.141 0.168
#> 30 y3 ~~ y3 1 0.164 0.008 20.666 0 0.148 0.179
#> 31 X ~~ X 1 0.983 0.036 26.946 0 0.911 1.054
#> 32 X ~~ Z 1 0.200 0.024 8.239 0 0.153 0.248
#> 33 Z ~~ Z 1 1.018 0.038 26.925 0 0.943 1.092
#> 34 Y ~~ Y 1 0.980 0.038 25.921 0 0.906 1.054
#>
#> $partable.input
#> lhs op rhs group mod
#> 1 X =~ x1 1
#> 2 X =~ x2 1
#> 3 X =~ x3 1
#> 4 Y =~ y1 1
#> 5 Y =~ y2 1
#> 6 Y =~ y3 1
#> 7 Z =~ z1 1
#> 8 Z =~ z2 1
#> 9 Z =~ z3 1
#> 10 Y ~ X 1
#> 11 Y ~ Z 1
#> 12 Y ~ X:Z 1
#>
#> $loglik
#> [1] -17493.59
#>
#> $iterations
#> [1] 31
#>
#> $convergence
#> [1] TRUE
#>
#> $ovs
#> [1] "x1" "x2" "x3" "z1" "z2" "z3" "y1" "y2" "y3"
#>
#> $quadrature
#> $quadrature$adaptive
#> [1] TRUE
#>
#> $quadrature$nodes.per.dim
#> [1] 24
#>
#> $quadrature$dimensions
#> [1] 1
#>
#> $quadrature$nodes.total
#> [1] 24
#>
#> $quadrature$eff.nodes.per.dim
#> [1] 70
#>
#> $quadrature$eff.nodes.total
#> [1] 70
#>
#>
#> $ngroups
#> [1] 1
#>
#> $group
#> NULL
#>
#> $group.label
#> NULL
#>
#> $lambda
#> X Z X:Z Y
#> x1 1.000 0.000 0.000 0.000
#> x2 0.803 0.000 0.000 0.000
#> x3 0.914 0.000 0.000 0.000
#> z1 0.000 1.000 0.000 0.000
#> z2 0.000 0.810 0.000 0.000
#> z3 0.000 0.881 0.000 0.000
#> y1 0.000 0.000 0.000 1.000
#> y2 0.000 0.000 0.000 0.798
#> y3 0.000 0.000 0.000 0.899
#>
#> $theta
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 0.158
#> x2 0.000 0.162
#> x3 0.000 0.000 0.165
#> z1 0.000 0.000 0.000 0.167
#> z2 0.000 0.000 0.000 0.000 0.160
#> z3 0.000 0.000 0.000 0.000 0.000 0.158
#> y1 0.000 0.000 0.000 0.000 0.000 0.000 0.160
#> y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.154
#> y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.164
#>
#> $wmat
#> X Z X:Z Y
#> x1 0.000 0.000 0.000 0.000
#> x2 0.000 0.000 0.000 0.000
#> x3 0.000 0.000 0.000 0.000
#> z1 0.000 0.000 0.000 0.000
#> z2 0.000 0.000 0.000 0.000
#> z3 0.000 0.000 0.000 0.000
#> y1 0.000 0.000 0.000 0.000
#> y2 0.000 0.000 0.000 0.000
#> y3 0.000 0.000 0.000 0.000
#>
#> $tmat
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 0.000
#> x2 0.000 0.000
#> x3 0.000 0.000 0.000
#> z1 0.000 0.000 0.000 0.000
#> z2 0.000 0.000 0.000 0.000 0.000
#> z3 0.000 0.000 0.000 0.000 0.000 0.000
#> y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#>
#> $nu
#> ~1
#> x1 1.023
#> x2 1.215
#> x3 0.919
#> z1 1.011
#> z2 1.206
#> z3 0.916
#> y1 1.036
#> y2 1.220
#> y3 0.953
#>
#> $alpha
#> ~1
#> X 0.000
#> Z 0.000
#> X:Z 0.200
#> Y 0.000
#>
#> $beta
#> X Z X:Z Y
#> X 0.000 0.000 0.000 0.673
#> Z 0.000 0.000 0.000 0.569
#> X:Z 0.000 0.000 0.000 0.718
#> Y 0.000 0.000 0.000 0.000
#>
#> $psi
#> X Z X:Z Y
#> X 0.983
#> Z 0.200 1.018
#> X:Z 0.000 0.000 1.040
#> Y 0.000 0.000 0.000 0.980
#>
#> $cov.ov
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 1.141
#> x2 0.789 0.796
#> x3 0.898 0.722 0.985
#> z1 0.200 0.161 0.183 1.184
#> z2 0.162 0.130 0.148 0.825 0.828
#> z3 0.176 0.142 0.161 0.897 0.727 0.948
#> y1 0.775 0.623 0.708 0.713 0.578 0.629 2.603
#> y2 0.619 0.497 0.565 0.570 0.462 0.502 1.951 1.712
#> y3 0.697 0.560 0.637 0.642 0.520 0.565 2.197 1.754 2.139
#>
#> $cov.lv
#> X Z X:Z Y
#> X 0.983
#> Z 0.200 1.018
#> X:Z 0.000 0.000 1.040
#> Y 0.775 0.713 0.747 2.443
#>
#> $cov.all
#> X Z X:Z Y x1 x2 x3 z1 z2 z3 y1 y2
#> X 0.983
#> Z 0.200 1.018
#> X:Z 0.000 0.000 1.040
#> Y 0.775 0.713 0.747 2.443
#> x1 0.983 0.200 0.000 0.775 1.141
#> x2 0.789 0.161 0.000 0.623 0.789 0.796
#> x3 0.898 0.183 0.000 0.708 0.898 0.722 0.985
#> z1 0.200 1.018 0.000 0.713 0.200 0.161 0.183 1.184
#> z2 0.162 0.825 0.000 0.578 0.162 0.130 0.148 0.825 0.828
#> z3 0.176 0.897 0.000 0.629 0.176 0.142 0.161 0.897 0.727 0.948
#> y1 0.775 0.713 0.747 2.443 0.775 0.623 0.708 0.713 0.578 0.629 2.603
#> y2 0.619 0.570 0.596 1.951 0.619 0.497 0.565 0.570 0.462 0.502 1.951 1.712
#> y3 0.697 0.642 0.672 2.197 0.697 0.560 0.637 0.642 0.520 0.565 2.197 1.754
#> y3
#> X
#> Z
#> X:Z
#> Y
#> x1
#> x2
#> x3
#> z1
#> z2
#> z3
#> y1
#> y2
#> y3 2.139
#>
#> $cor.ov
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 1.000
#> x2 0.828 1.000
#> x3 0.847 0.815 1.000
#> z1 0.172 0.166 0.169 1.000
#> z2 0.167 0.161 0.164 0.833 1.000
#> z3 0.170 0.163 0.167 0.846 0.820 1.000
#> y1 0.450 0.432 0.442 0.406 0.394 0.400 1.000
#> y2 0.443 0.426 0.435 0.400 0.388 0.394 0.924 1.000
#> y3 0.446 0.429 0.439 0.403 0.391 0.397 0.931 0.917 1.000
#>
#> $cor.lv
#> X Z X:Z Y
#> X 1.000
#> Z 0.200 1.000
#> X:Z 0.000 0.000 1.000
#> Y 0.500 0.452 0.469 1.000
#>
#> $cor.all
#> X Z X:Z Y x1 x2 x3 z1 z2 z3 y1 y2
#> X 1.000
#> Z 0.200 1.000
#> X:Z 0.000 0.000 1.000
#> Y 0.500 0.452 0.469 1.000
#> x1 0.928 0.186 0.000 0.464 1.000
#> x2 0.892 0.179 0.000 0.446 0.828 1.000
#> x3 0.913 0.183 0.000 0.456 0.847 0.815 1.000
#> z1 0.186 0.927 0.000 0.419 0.172 0.166 0.169 1.000
#> z2 0.180 0.898 0.000 0.406 0.167 0.161 0.164 0.833 1.000
#> z3 0.183 0.913 0.000 0.413 0.170 0.163 0.167 0.846 0.820 1.000
#> y1 0.485 0.438 0.454 0.969 0.450 0.432 0.442 0.406 0.394 0.400 1.000
#> y2 0.477 0.432 0.447 0.954 0.443 0.426 0.435 0.400 0.388 0.394 0.924 1.000
#> y3 0.481 0.435 0.450 0.961 0.446 0.429 0.439 0.403 0.391 0.397 0.931 0.917
#> y3
#> X
#> Z
#> X:Z
#> Y
#> x1
#> x2
#> x3
#> z1
#> z2
#> z3
#> y1
#> y2
#> y3 1.000
#>
#> $mean.lv
#> ~1
#> X 0.000
#> Z 0.000
#> X:Z 0.200
#> Y 0.144
#>
#> $mean.ov
#> ~1
#> x1 1.023
#> x2 1.215
#> x3 0.919
#> z1 1.011
#> z2 1.206
#> z3 0.916
#> y1 1.180
#> y2 1.335
#> y3 1.083
#>
#> $mean.all
#> ~1
#> X 0.000
#> Z 0.000
#> X:Z 0.200
#> Y 0.144
#> x1 1.023
#> x2 1.215
#> x3 0.919
#> z1 1.011
#> z2 1.206
#> z3 0.916
#> y1 1.180
#> y2 1.335
#> y3 1.083
#>
#> $r2.all
#> Y x1 x2 x3 z1 z2 z3 y1 y2 y3
#> 0.599 0.861 0.796 0.833 0.859 0.807 0.833 0.939 0.910 0.924
#>
#> $r2.lv
#> Y
#> 0.599
#>
#> $r2.ov
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> 0.861 0.796 0.833 0.859 0.807 0.833 0.939 0.910 0.924
#>
#> $res.all
#> Y x1 x2 x3 z1 z2 z3 y1 y2 y3
#> 0.401 0.139 0.204 0.167 0.141 0.193 0.167 0.061 0.090 0.076
#>
#> $res.lv
#> Y
#> 0.401
#>
#> $res.ov
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> 0.139 0.204 0.167 0.141 0.193 0.167 0.061 0.090 0.076
#>
#> $iteration.history
#> iteration mode loglik abs.change rel.change elapsed.time
#> 1 1 EM -17493.92 Inf Inf 0.024
#> 2 2 EM -17493.71 2.119961e-01 1.211827e-05 0.039
#> 3 3 EM -17493.67 3.995863e-02 2.284171e-06 0.059
#> 4 4 EM -17493.65 1.338444e-02 7.651022e-07 0.070
#> 5 5 EM -17493.64 9.793522e-03 5.598328e-07 0.080
#> 6 6 EM -17493.59 5.002409e-02 2.859558e-06 0.101
#> 7 7 EM -17493.59 6.007321e-03 3.434011e-07 0.111
#> 8 8 EM -17493.58 4.670163e-03 2.669643e-07 0.121
#> 9 9 EM -17493.63 4.680668e-02 2.675648e-06 0.142
#> 10 10 EM -17493.63 3.368616e-03 1.925624e-07 0.152
#> 11 11 EM -17493.62 2.718920e-03 1.554235e-07 0.162
#> 12 12 EM -17493.62 2.516604e-03 1.438583e-07 0.183
#> 13 13 EM -17493.62 2.172343e-03 1.241792e-07 0.194
#> 14 14 QN -17493.61 9.698486e-03 5.544013e-07 0.222
#> 15 15 EM -17493.61 3.289445e-03 1.880369e-07 0.237
#> 16 16 EM -17493.60 2.365309e-03 1.352099e-07 0.247
#> 17 17 EM -17493.60 1.328041e-03 7.591581e-08 0.257
#> 18 18 EM -17493.60 2.313673e-03 1.322582e-07 0.273
#> 19 19 EM -17493.60 1.769325e-03 1.011412e-07 0.283
#> 20 20 EM -17493.60 1.159928e-03 6.630584e-08 0.294
#> 21 21 EM -17493.60 8.160032e-04 4.664582e-08 0.310
#> 22 22 EM -17493.60 1.296458e-03 7.411042e-08 0.320
#> 23 23 EM -17493.60 8.085805e-04 4.622152e-08 0.331
#> 24 24 EM -17493.59 5.928580e-04 3.389000e-08 0.347
#> 25 25 EM -17493.59 1.737297e-04 9.931044e-09 0.358
#> 26 26 EM -17493.59 9.062090e-05 5.180233e-09 0.369
#> 27 27 QN -17493.59 5.307253e-04 3.033827e-08 0.432
#> 28 28 QN -17493.59 2.602646e-07 1.487771e-11 0.453
#> 29 29 EM -17493.59 2.328088e-07 1.330823e-11 0.464
#> 30 30 FS -17493.59 5.373062e-06 3.071445e-10 0.681
#> 31 31 EM -17493.59 0.000000e+00 0.000000e+00 0.689
#> expected.remaining.iterations expected.final.loglik
#> 1 NA NA
#> 2 NA NA
#> 3 NA NA
#> 4 4 -17493.65
#> 5 5 -17493.64
#> 6 12 -17493.57
#> 7 9 -17493.58
#> 8 8 -17493.58
#> 9 7 -17493.63
#> 10 8 -17493.62
#> 11 8 -17493.62
#> 12 8 -17493.62
#> 13 11 -17493.61
#> 14 20 -17493.60
#> 15 21 -17493.59
#> 16 19 -17493.59
#> 17 38 -17493.58
#> 18 48 -17493.57
#> 19 46 -17493.57
#> 20 29 -17493.58
#> 21 17 -17493.59
#> 22 14 -17493.59
#> 23 10 -17493.59
#> 24 12 -17493.59
#> 25 7 -17493.59
#> 26 0 -17493.59
#> 27 3 -17493.59
#> 28 0 -17493.59
#> 29 0 -17493.59
#> 30 0 -17493.59
#> 31 0 -17493.59
#>
modsem_inspect(est, what = "optim")
#> $coefficients.free
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1
#> 0.803 0.914 0.810 0.881 0.798 0.899 1.023 1.215 0.919 1.011 1.206
#> z3~1 y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> 0.916 1.036 1.220 0.953 0.158 0.162 0.165 0.167 0.160 0.158 0.160
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> 0.154 0.164 0.983 0.200 1.018 0.980 0.673 0.569 0.718
#>
#> $vcov.free
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1 x2~1 x3~1 z1~1 z2~1 z3~1
#> X=~x2 0.000
#> X=~x3 0.000 0.000
#> Z=~z2 0.000 0.000 0.000
#> Z=~z3 0.000 0.000 0.000 0.000
#> Y=~y2 0.000 0.000 0.000 0.000 0.000
#> Y=~y3 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> x2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> z2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x1~~x1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~1 y2~1 y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1 0.001
#> y2~1 0.001 0.001
#> y3~1 0.001 0.001 0.001
#> x1~~x1 0.000 0.000 0.000 0.000
#> x2~~x2 0.000 0.000 0.000 0.000 0.000
#> x3~~x3 0.000 0.000 0.000 0.000 0.000 0.000
#> z1~~z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z2~~z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> z3~~z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y1~~y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3~~y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Z~~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y Y~X Y~Z Y~X:Z
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1
#> y2~~y2 0.000
#> y3~~y3 0.000 0.000
#> X~~X 0.000 0.000 0.000
#> X~~Z 0.000 0.000 0.000 0.001
#> Z~~Z 0.000 0.000 0.000 0.000 0.000
#> Y~~Y 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#> Y~X:Z 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001
#>
#> $information
#> X=~x2 X=~x3 Z=~z2 Z=~z3 Y=~y2 Y=~y3 x1~1
#> X=~x2 8936.063
#> X=~x3 -2766.571 8142.638
#> Z=~z2 63.767 74.580 9237.096
#> Z=~z3 72.852 81.804 -3031.226 8774.480
#> Y=~y2 -169.905 -194.400 -158.844 -172.314 23797.096
#> Y=~y3 -176.994 -205.515 -169.933 -183.209 -8378.287 20996.450
#> x1~1 32.516 35.878 91.950 97.584 -121.649 -132.023 8008.419
#> x2~1 26.903 28.127 72.085 76.502 -95.368 -103.501 -3633.364
#> x3~1 28.567 32.913 80.785 85.735 -106.877 -115.993 -4071.860
#> z1~1 91.054 99.144 24.235 28.984 -126.473 -133.370 53.857
#> z2~1 77.075 83.922 20.807 24.534 -107.056 -112.894 45.588
#> z3~1 84.554 92.065 22.505 27.209 -117.444 -123.848 50.012
#> y1~1 -23.969 -26.796 -24.065 -28.563 -592.195 -629.884 -175.948
#> y2~1 -19.786 -22.119 -19.865 -23.578 1375.033 -519.950 -145.240
#> y3~1 -21.041 -23.522 -21.125 -25.074 -519.845 1206.760 -154.452
#> x1~~x1 -1389.947 -1476.349 16.813 27.391 -9.209 -10.067 9.993
#> x2~~x2 2732.443 -906.763 25.269 14.873 -6.019 -13.863 -8.372
#> x3~~x3 -1031.735 2748.595 14.420 17.790 14.596 22.362 -7.393
#> z1~~z1 12.672 13.403 -1310.554 -1439.617 14.792 13.963 39.087
#> z2~~z2 33.356 27.747 2862.218 -1037.980 -2.978 0.285 12.944
#> z3~~z3 24.008 33.465 -1120.634 2990.081 -14.401 -17.544 33.884
#> y1~~y1 1.522 1.020 7.099 5.760 -1488.009 -1620.134 3.522
#> y2~~y2 3.406 -5.469 -12.371 -9.414 3076.460 -1163.047 -11.157
#> y3~~y3 -16.431 -12.864 -8.415 -10.835 -1244.583 2872.689 2.006
#> X~~X 1114.457 1246.319 -50.414 -57.283 62.824 66.086 -5.214
#> X~~Z -118.140 -132.884 111.761 130.414 31.862 34.285 -52.111
#> Z~~Z -26.143 -29.548 1158.216 1268.734 49.083 52.207 -16.739
#> Y~~Y -29.420 -42.719 -33.020 -35.367 551.511 591.811 -12.766
#> Y~X -291.148 -315.639 -39.706 -48.443 435.263 458.806 -72.368
#> Y~Z -63.485 -67.765 -275.766 -285.538 397.180 432.683 -418.653
#> Y~X:Z -292.995 -337.420 -317.224 -347.953 418.275 438.007 -75.993
#> x2~1 x3~1 z1~1 z2~1 z3~1 y1~1 y2~1
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1 9487.389
#> x3~1 -3192.184 8576.430
#> z1~1 42.221 47.317 7692.496
#> z2~1 35.739 40.053 -3640.374 9446.348
#> z3~1 39.207 43.939 -3993.594 -3380.475 8930.971
#> y1~1 -137.937 -154.584 -144.381 -122.215 -134.074 7702.686
#> y2~1 -113.863 -127.604 -119.183 -100.885 -110.674 -3983.851 9665.675
#> y3~1 -121.085 -135.698 -126.742 -107.284 -117.693 -4236.535 -3497.131
#> x1~~x1 7.834 8.780 49.424 41.836 45.895 -7.082 -5.846
#> x2~~x2 -6.563 -7.356 12.126 10.264 11.260 4.722 3.898
#> x3~~x3 -5.796 -6.496 31.335 26.524 29.098 5.565 4.594
#> z1~~z1 30.643 34.341 -7.607 -6.439 -7.064 -1.770 -1.461
#> z2~~z2 10.148 11.373 5.858 4.959 5.440 -2.219 -1.831
#> z3~~z3 26.564 29.770 -6.298 -5.331 -5.848 9.377 7.740
#> y1~~y1 2.761 3.094 -4.870 -4.122 -4.522 -0.198 -0.163
#> y2~~y2 -8.747 -9.802 2.646 2.240 2.457 -0.482 -0.398
#> y3~~y3 1.572 1.762 -3.194 -2.704 -2.966 0.157 0.130
#> X~~X -4.088 -4.581 -30.274 -25.626 -28.112 -2.204 -1.819
#> X~~Z -40.853 -45.784 -39.204 -33.185 -36.405 55.739 46.011
#> Z~~Z -13.123 -14.707 7.282 6.164 6.762 -13.179 -10.879
#> Y~~Y -10.008 -11.216 -13.671 -11.572 -12.695 -1.233 -1.018
#> Y~X -56.734 -63.581 -399.050 -337.785 -370.560 -34.442 -28.431
#> Y~Z -328.208 -367.818 -71.576 -60.587 -66.466 -37.672 -31.097
#> Y~X:Z -59.576 -66.766 -51.143 -43.291 -47.491 129.454 106.861
#> y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1 8511.184
#> x1~~x1 -6.217 15997.375
#> x2~~x2 4.145 3563.719 22472.558
#> x3~~x3 4.885 4024.024 2487.856 18366.467
#> z1~~z1 -1.554 0.169 12.903 20.640 14793.817
#> z2~~z2 -1.948 53.081 -23.376 24.150 3288.419 22302.790
#> z3~~z3 8.231 14.058 43.412 18.089 3968.110 2885.094 19915.270
#> y1~~y1 -0.174 20.324 10.322 16.769 19.203 20.378 35.817
#> y2~~y2 -0.423 6.672 -18.050 28.905 2.797 10.596 -10.398
#> y3~~y3 0.138 9.051 20.620 -4.925 12.881 -7.001 0.503
#> X~~X -1.934 283.346 175.199 234.685 -8.389 -15.364 -7.478
#> X~~Z 48.929 -22.643 -51.766 -62.316 12.753 13.374 -27.387
#> Z~~Z -11.568 -13.518 5.617 8.448 265.550 188.456 237.171
#> Y~~Y -1.082 88.263 34.250 97.153 85.949 57.423 64.332
#> Y~X -30.234 -169.879 -54.700 -127.828 33.558 -16.921 6.833
#> Y~Z -33.069 -24.555 16.825 2.349 -137.718 -41.301 -144.287
#> Y~X:Z 113.639 -102.912 -97.898 -72.604 -101.340 -117.147 -141.262
#> y1~~y1 y2~~y2 y3~~y3 X~~X X~~Z Z~~Z Y~~Y
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1 14833.394
#> y2~~y2 3729.685 23354.351
#> y3~~y3 4425.376 3353.661 18111.286
#> X~~X -2.196 0.884 4.971 3650.260
#> X~~Z 0.909 0.407 -1.748 -316.379 1818.438
#> Z~~Z -4.845 4.027 4.499 0.560 44.790 3588.577
#> Y~~Y 171.261 79.637 60.812 9.187 -1.195 8.958 760.433
#> Y~X 18.683 -9.432 11.685 116.714 35.875 -2.338 52.717
#> Y~Z -12.438 42.474 -8.669 10.998 59.715 90.433 48.382
#> Y~X:Z -25.459 15.094 54.451 116.208 54.381 111.249 109.983
#> Y~X Y~Z Y~X:Z
#> X=~x2
#> X=~x3
#> Z=~z2
#> Z=~z3
#> Y=~y2
#> Y=~y3
#> x1~1
#> x2~1
#> x3~1
#> z1~1
#> z2~1
#> z3~1
#> y1~1
#> y2~1
#> y3~1
#> x1~~x1
#> x2~~x2
#> x3~~x3
#> z1~~z1
#> z2~~z2
#> z3~~z3
#> y1~~y1
#> y2~~y2
#> y3~~y3
#> X~~X
#> X~~Z
#> Z~~Z
#> Y~~Y
#> Y~X 1549.633
#> Y~Z 320.376 1596.307
#> Y~X:Z -64.010 -26.389 1510.270
#>
#> $loglik
#> [1] -17493.59
#>
#> $iterations
#> [1] 31
#>
#> $convergence
#> [1] TRUE
#>
#> $quadrature
#> $quadrature$adaptive
#> [1] TRUE
#>
#> $quadrature$nodes.per.dim
#> [1] 24
#>
#> $quadrature$dimensions
#> [1] 1
#>
#> $quadrature$nodes.total
#> [1] 24
#>
#> $quadrature$eff.nodes.per.dim
#> [1] 70
#>
#> $quadrature$eff.nodes.total
#> [1] 70
#>
#>
#> $iteration.history
#> iteration mode loglik abs.change rel.change elapsed.time
#> 1 1 EM -17493.92 Inf Inf 0.024
#> 2 2 EM -17493.71 2.119961e-01 1.211827e-05 0.039
#> 3 3 EM -17493.67 3.995863e-02 2.284171e-06 0.059
#> 4 4 EM -17493.65 1.338444e-02 7.651022e-07 0.070
#> 5 5 EM -17493.64 9.793522e-03 5.598328e-07 0.080
#> 6 6 EM -17493.59 5.002409e-02 2.859558e-06 0.101
#> 7 7 EM -17493.59 6.007321e-03 3.434011e-07 0.111
#> 8 8 EM -17493.58 4.670163e-03 2.669643e-07 0.121
#> 9 9 EM -17493.63 4.680668e-02 2.675648e-06 0.142
#> 10 10 EM -17493.63 3.368616e-03 1.925624e-07 0.152
#> 11 11 EM -17493.62 2.718920e-03 1.554235e-07 0.162
#> 12 12 EM -17493.62 2.516604e-03 1.438583e-07 0.183
#> 13 13 EM -17493.62 2.172343e-03 1.241792e-07 0.194
#> 14 14 QN -17493.61 9.698486e-03 5.544013e-07 0.222
#> 15 15 EM -17493.61 3.289445e-03 1.880369e-07 0.237
#> 16 16 EM -17493.60 2.365309e-03 1.352099e-07 0.247
#> 17 17 EM -17493.60 1.328041e-03 7.591581e-08 0.257
#> 18 18 EM -17493.60 2.313673e-03 1.322582e-07 0.273
#> 19 19 EM -17493.60 1.769325e-03 1.011412e-07 0.283
#> 20 20 EM -17493.60 1.159928e-03 6.630584e-08 0.294
#> 21 21 EM -17493.60 8.160032e-04 4.664582e-08 0.310
#> 22 22 EM -17493.60 1.296458e-03 7.411042e-08 0.320
#> 23 23 EM -17493.60 8.085805e-04 4.622152e-08 0.331
#> 24 24 EM -17493.59 5.928580e-04 3.389000e-08 0.347
#> 25 25 EM -17493.59 1.737297e-04 9.931044e-09 0.358
#> 26 26 EM -17493.59 9.062090e-05 5.180233e-09 0.369
#> 27 27 QN -17493.59 5.307253e-04 3.033827e-08 0.432
#> 28 28 QN -17493.59 2.602646e-07 1.487771e-11 0.453
#> 29 29 EM -17493.59 2.328088e-07 1.330823e-11 0.464
#> 30 30 FS -17493.59 5.373062e-06 3.071445e-10 0.681
#> 31 31 EM -17493.59 0.000000e+00 0.000000e+00 0.689
#> expected.remaining.iterations expected.final.loglik
#> 1 NA NA
#> 2 NA NA
#> 3 NA NA
#> 4 4 -17493.65
#> 5 5 -17493.64
#> 6 12 -17493.57
#> 7 9 -17493.58
#> 8 8 -17493.58
#> 9 7 -17493.63
#> 10 8 -17493.62
#> 11 8 -17493.62
#> 12 8 -17493.62
#> 13 11 -17493.61
#> 14 20 -17493.60
#> 15 21 -17493.59
#> 16 19 -17493.59
#> 17 38 -17493.58
#> 18 48 -17493.57
#> 19 46 -17493.57
#> 20 29 -17493.58
#> 21 17 -17493.59
#> 22 14 -17493.59
#> 23 10 -17493.59
#> 24 12 -17493.59
#> 25 7 -17493.59
#> 26 0 -17493.59
#> 27 3 -17493.59
#> 28 0 -17493.59
#> 29 0 -17493.59
#> 30 0 -17493.59
#> 31 0 -17493.59
#>
modsem_inspect(est, what = "matrices")
#> $lambda
#> X Z X:Z Y
#> x1 1.000 0.000 0.000 0.000
#> x2 0.803 0.000 0.000 0.000
#> x3 0.914 0.000 0.000 0.000
#> z1 0.000 1.000 0.000 0.000
#> z2 0.000 0.810 0.000 0.000
#> z3 0.000 0.881 0.000 0.000
#> y1 0.000 0.000 0.000 1.000
#> y2 0.000 0.000 0.000 0.798
#> y3 0.000 0.000 0.000 0.899
#>
#> $theta
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 0.158
#> x2 0.000 0.162
#> x3 0.000 0.000 0.165
#> z1 0.000 0.000 0.000 0.167
#> z2 0.000 0.000 0.000 0.000 0.160
#> z3 0.000 0.000 0.000 0.000 0.000 0.158
#> y1 0.000 0.000 0.000 0.000 0.000 0.000 0.160
#> y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.154
#> y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.164
#>
#> $wmat
#> X Z X:Z Y
#> x1 0.000 0.000 0.000 0.000
#> x2 0.000 0.000 0.000 0.000
#> x3 0.000 0.000 0.000 0.000
#> z1 0.000 0.000 0.000 0.000
#> z2 0.000 0.000 0.000 0.000
#> z3 0.000 0.000 0.000 0.000
#> y1 0.000 0.000 0.000 0.000
#> y2 0.000 0.000 0.000 0.000
#> y3 0.000 0.000 0.000 0.000
#>
#> $tmat
#> x1 x2 x3 z1 z2 z3 y1 y2 y3
#> x1 0.000
#> x2 0.000 0.000
#> x3 0.000 0.000 0.000
#> z1 0.000 0.000 0.000 0.000
#> z2 0.000 0.000 0.000 0.000 0.000
#> z3 0.000 0.000 0.000 0.000 0.000 0.000
#> y1 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#> y3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
#>
#> $psi
#> X Z X:Z Y
#> X 0.983
#> Z 0.200 1.018
#> X:Z 0.000 0.000 1.040
#> Y 0.000 0.000 0.000 0.980
#>
#> $beta
#> X Z X:Z Y
#> X 0.000 0.000 0.000 0.673
#> Z 0.000 0.000 0.000 0.569
#> X:Z 0.000 0.000 0.000 0.718
#> Y 0.000 0.000 0.000 0.000
#>
#> $nu
#> ~1
#> x1 1.023
#> x2 1.215
#> x3 0.919
#> z1 1.011
#> z2 1.206
#> z3 0.916
#> y1 1.036
#> y2 1.220
#> y3 0.953
#>
#> $alpha
#> ~1
#> X 0.000
#> Z 0.000
#> X:Z 0.200
#> Y 0.000
#>
# }