Skip to contents

function 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", ...)

Arguments

object

A fitted object of class "modsem_da".

what

Character scalar selecting what to return (see Details). If NULL the value "default" is used.

...

Passed straight to modsem_inspect_da().

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 data slot

"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/FALSE indicating whether the model converged.

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.*, or mean.* 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.

Methods (by class)

  • modsem_inspect(lavaan): Inspect a lavaan object

  • modsem_inspect(modsem_da): Inspect a modsem_da object

  • modsem_inspect(modsem_pi): Inspect a modsem_pi object

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   8937.663                                                            
#> X=~x3  -2765.298  8143.177                                                  
#> Z=~z2     63.680    74.637  9230.430                                        
#> Z=~z3     72.671    81.873 -3031.836  8767.891                              
#> Y=~y2   -169.928  -194.536  -158.847  -172.302 23778.500                    
#> Y=~y3   -176.980  -205.734  -169.912  -183.184 -8379.041 20979.839          
#> x1~1      32.800    34.357    92.187    97.631  -121.947  -132.437  8008.874
#> x2~1      26.516    26.932    72.263    76.530   -95.591  -103.814 -3632.915
#> x3~1      28.822    30.984    81.006    85.790  -107.157  -116.375 -4072.499
#> z1~1      90.687    98.942    24.553    29.331  -126.457  -133.343    53.740
#> z2~1      76.773    83.762    20.167    24.835  -107.055  -112.885    45.495
#> z3~1      84.227    91.893    22.766    26.728  -117.447  -123.844    49.912
#> y1~1     -23.829   -26.866   -24.077   -28.590  -592.270  -629.967  -175.978
#> y2~1     -19.668   -22.175   -19.873   -23.598  1374.474  -519.987  -145.251
#> y3~1     -20.917   -23.583   -21.135   -25.096  -519.973  1206.437  -154.474
#> x1~~x1 -1393.770 -1480.872    17.214    27.757   -10.435   -11.275     2.627
#> x2~~x2  2715.113  -912.767    25.860    15.803    -6.259   -14.448   -12.831
#> x3~~x3 -1032.219  2739.681    14.433    17.586    14.617    22.611    -2.727
#> z1~~z1    12.166    13.088 -1307.895 -1436.786    14.556    13.758    38.943
#> z2~~z2    33.191    27.773  2843.255 -1035.370    -2.926     0.292    12.432
#> z3~~z3    24.306    33.479 -1118.160  2972.149   -14.388   -17.495    34.484
#> y1~~y1     1.155     0.691     7.148     5.847 -1487.599 -1619.943     2.718
#> y2~~y2     3.596    -5.546   -12.280    -9.371  3042.780 -1161.310   -11.068
#> y3~~y3   -16.478   -12.616    -8.444   -10.839 -1243.130  2846.334     2.592
#> X~~X    1129.522  1258.403   -50.800   -57.746    62.743    65.865    -9.469
#> X~~Z    -118.616  -133.004   111.912   130.598    32.062    34.507   -51.817
#> Z~~Z     -25.908   -29.569  1157.944  1268.397    48.954    52.058   -16.930
#> Y~~Y     -29.986   -43.086   -32.830   -35.137   551.187   591.432   -13.056
#> Y~X     -290.129  -314.920   -39.931   -48.678   435.379   458.904   -71.984
#> Y~Z      -64.170   -69.124  -275.843  -285.755   396.749   432.186  -418.398
#> Y~X:Z   -291.906  -336.777  -317.599  -348.310   418.328   438.023   -76.945
#>             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.164                                                            
#> x3~1   -3192.312  8577.455                                                  
#> z1~1      42.125    47.223  7691.950                                        
#> z2~1      35.662    39.977 -3639.979  9445.822                              
#> z3~1      39.124    43.858 -3993.346 -3380.655  8930.681                    
#> y1~1    -137.944  -154.635  -144.351  -122.203  -134.067  7702.338          
#> y2~1    -113.858  -127.635  -119.147  -100.866  -110.658 -3983.535  9664.730
#> y3~1    -121.087  -135.739  -126.711  -107.270  -117.684 -4236.451 -3496.751
#> x1~~x1    14.018    15.714    49.547    41.945    46.017    -6.742    -5.565
#> x2~~x2   -27.270   -11.275    13.111    11.100    12.177     4.006     3.306
#> x3~~x3    -2.137   -16.187    31.576    26.731    29.326     5.888     4.860
#> z1~~z1    30.526    34.220   -13.105    -7.846    -8.463    -1.817    -1.500
#> z2~~z2     9.745    10.924     4.616    -5.060     4.381    -2.243    -1.852
#> z3~~z3    27.031    30.302    -7.788    -6.605   -13.272     9.408     7.765
#> y1~~y1     2.130     2.388    -4.844    -4.101    -4.499    -5.513    -2.278
#> y2~~y2    -8.676    -9.726     2.652     2.245     2.463    -2.111   -10.629
#> y3~~y3     2.032     2.277    -3.218    -2.725    -2.989    -1.643    -1.316
#> X~~X      -7.422    -8.320   -31.055   -26.290   -28.846    -2.284    -1.885
#> X~~Z     -40.618   -45.533   -39.287   -33.259   -36.488    55.734    46.003
#> Z~~Z     -13.271   -14.877     7.283     6.165     6.772   -13.172   -10.872
#> Y~~Y     -10.234   -11.472   -13.650   -11.556   -12.675    -1.274    -1.051
#> Y~X      -56.426   -63.254  -398.926  -337.720  -370.505   -34.499   -28.475
#> Y~Z     -327.970  -367.654   -71.454   -60.491   -66.367   -37.586   -31.023
#> Y~X:Z    -60.315   -67.613   -51.324   -43.449   -47.672   129.438   106.837
#>             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    8510.678                                                            
#> x1~~x1    -5.918 15644.485                                                  
#> x2~~x2     3.516  3555.646 22119.165                                        
#> x3~~x3     5.169  4015.196  2493.916 18024.329                              
#> z1~~z1    -1.595     2.197    14.407    21.157 14706.033                    
#> z2~~z2    -1.969    51.922   -22.951    23.566  3266.326 22141.544          
#> z3~~z3     8.259    13.092    42.358    18.605  3942.609  2866.642 19780.844
#> y1~~y1    -2.181    20.128    10.861    17.001    18.818    20.388    35.634
#> y2~~y2    -1.650     6.782   -18.889    29.462     2.999    10.379   -10.309
#> y3~~y3    -6.249     8.646    21.479    -5.534    12.844    -6.952     0.393
#> X~~X      -2.005   249.762   149.557   227.823    -9.817   -14.994    -6.750
#> X~~Z      48.924   -23.151   -50.086   -62.739    12.841    13.341   -27.479
#> Z~~Z     -11.562   -13.486     4.574     8.668   264.467   187.514   236.181
#> Y~~Y      -1.111    87.026    35.733    97.515    85.610    57.211    63.982
#> Y~X      -30.283  -170.685   -57.202  -129.176    33.316   -16.882     6.780
#> Y~Z      -32.993   -22.850    16.127     4.654  -137.711   -41.476  -143.601
#> Y~X:Z    113.621  -105.092  -100.893   -73.733  -101.360  -116.679  -140.977
#>           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 14745.960                                                            
#> y2~~y2  3703.920 23178.916                                                  
#> y3~~y3  4398.475  3330.801 17993.313                                        
#> X~~X      -3.198     0.763     5.287  3672.273                              
#> X~~Z       1.136     0.374    -1.842  -316.945  1819.820                    
#> Z~~Z      -4.966     4.014     4.543     0.776    44.085  3582.778          
#> Y~~Y     170.551    79.284    60.619     7.359    -0.955     8.760   759.411
#> Y~X       18.643    -9.542    11.635   120.387    36.084    -2.333    52.220
#> Y~Z      -12.941    42.373    -8.506     7.231    59.599    90.467    47.488
#> Y~X:Z    -25.587    14.883    54.346   120.907    54.425   111.309   109.091
#>              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.740                    
#> Y~Z      320.344  1596.529          
#> Y~X:Z    -63.161   -27.121  1511.215
#> 
#> $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.205 
#>   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.982  0.200  1.017  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.205 
#>   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.982  0.200  1.017  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.750       0    0.779    0.828
#> 3    X =~  x3           1 0.914     0.014  67.511       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.015       0    0.786    0.835
#> 6    Z =~  z3           1 0.881     0.013  67.530       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.447       0    0.784    0.813
#> 9    Y =~  y3           1 0.899     0.008 112.467       0    0.884    0.915
#> 10   Y  ~   X           1 0.673     0.031  21.665       0    0.612    0.734
#> 11   Y  ~   Z           1 0.569     0.030  18.709       0    0.509    0.628
#> 12   Y  ~ X:Z           1 0.718     0.028  25.822       0    0.664    0.773
#> 13  x1 ~1               1 1.023     0.024  42.773       0    0.976    1.070
#> 14  x2 ~1               1 1.215     0.020  60.836       0    1.176    1.255
#> 15  x3 ~1               1 0.919     0.022  41.370       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.205     0.020  59.250       0    1.166    1.245
#> 18  z3 ~1               1 0.916     0.022  42.044       0    0.873    0.958
#> 19  y1 ~1               1 1.036     0.033  31.383       0    0.972    1.101
#> 20  y2 ~1               1 1.220     0.027  45.406       0    1.167    1.272
#> 21  y3 ~1               1 0.953     0.030  31.786       0    0.894    1.012
#> 22  x1 ~~  x1           1 0.158     0.009  17.883       0    0.141    0.176
#> 23  x2 ~~  x2           1 0.162     0.007  22.937       0    0.148    0.176
#> 24  x3 ~~  x3           1 0.165     0.008  20.507       0    0.149    0.180
#> 25  z1 ~~  z1           1 0.167     0.009  18.441       0    0.149    0.185
#> 26  z2 ~~  z2           1 0.160     0.007  22.588       0    0.146    0.174
#> 27  z3 ~~  z3           1 0.158     0.008  20.695       0    0.143    0.173
#> 28  y1 ~~  y1           1 0.160     0.009  17.951       0    0.142    0.177
#> 29  y2 ~~  y2           1 0.154     0.007  22.593       0    0.141    0.168
#> 30  y3 ~~  y3           1 0.164     0.008  20.602       0    0.148    0.179
#> 31   X ~~   X           1 0.982     0.036  26.969       0    0.911    1.053
#> 32   X ~~   Z           1 0.200     0.024   8.243       0    0.153    0.248
#> 33   Z ~~   Z           1 1.017     0.038  26.894       0    0.943    1.092
#> 34   Y ~~   Y           1 0.980     0.038  25.908       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.6
#> 
#> $iterations
#> [1] 17
#> 
#> $convergence
#> [1] TRUE
#> 
#> $ovs
#> [1] "x1" "x2" "x3" "z1" "z2" "z3" "y1" "y2" "y3"
#> 
#> $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.205
#> 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.982                  
#> Z   0.200 1.017            
#> X:Z 0.000 0.000 1.039      
#> Y   0.000 0.000 0.000 0.980
#> 
#> $cov.ov
#>       x1    x2    x3    z1    z2    z3    y1    y2    y3
#> x1 1.140                                                
#> x2 0.789 0.796                                          
#> x3 0.897 0.721 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.774 0.622 0.708 0.713 0.578 0.629 2.602            
#> y2 0.618 0.497 0.565 0.569 0.461 0.502 1.950 1.711      
#> y3 0.696 0.559 0.636 0.641 0.520 0.565 2.196 1.753 2.139
#> 
#> $cov.lv
#>         X     Z   X:Z     Y
#> X   0.982                  
#> Z   0.200 1.017            
#> X:Z 0.000 0.000 1.039      
#> Y   0.774 0.713 0.746 2.442
#> 
#> $cov.all
#>         X     Z   X:Z     Y    x1    x2    x3    z1    z2    z3    y1    y2
#> X   0.982                                                                  
#> Z   0.200 1.017                                                            
#> X:Z 0.000 0.000 1.039                                                      
#> Y   0.774 0.713 0.746 2.442                                                
#> x1  0.982 0.200 0.000 0.774 1.140                                          
#> x2  0.789 0.161 0.000 0.622 0.789 0.796                                    
#> x3  0.897 0.183 0.000 0.708 0.897 0.721 0.985                              
#> z1  0.200 1.017 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.774 0.713 0.746 2.442 0.774 0.622 0.708 0.713 0.578 0.629 2.602      
#> y2  0.618 0.569 0.596 1.950 0.618 0.497 0.565 0.569 0.461 0.502 1.950 1.711
#> y3  0.696 0.641 0.671 2.196 0.696 0.559 0.636 0.641 0.520 0.565 2.196 1.753
#>        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.814 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.453 0.468 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.453 0.468 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.814 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.407 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.484 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.205
#> z3 0.916
#> y1 1.180
#> y2 1.334
#> y3 1.082
#> 
#> $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.205
#> z3  0.916
#> y1  1.180
#> y2  1.334
#> y3  1.082
#> 
#> $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 
#> 
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.205 
#>   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.982  0.200  1.017  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   8937.663                                                            
#> X=~x3  -2765.298  8143.177                                                  
#> Z=~z2     63.680    74.637  9230.430                                        
#> Z=~z3     72.671    81.873 -3031.836  8767.891                              
#> Y=~y2   -169.928  -194.536  -158.847  -172.302 23778.500                    
#> Y=~y3   -176.980  -205.734  -169.912  -183.184 -8379.041 20979.839          
#> x1~1      32.800    34.357    92.187    97.631  -121.947  -132.437  8008.874
#> x2~1      26.516    26.932    72.263    76.530   -95.591  -103.814 -3632.915
#> x3~1      28.822    30.984    81.006    85.790  -107.157  -116.375 -4072.499
#> z1~1      90.687    98.942    24.553    29.331  -126.457  -133.343    53.740
#> z2~1      76.773    83.762    20.167    24.835  -107.055  -112.885    45.495
#> z3~1      84.227    91.893    22.766    26.728  -117.447  -123.844    49.912
#> y1~1     -23.829   -26.866   -24.077   -28.590  -592.270  -629.967  -175.978
#> y2~1     -19.668   -22.175   -19.873   -23.598  1374.474  -519.987  -145.251
#> y3~1     -20.917   -23.583   -21.135   -25.096  -519.973  1206.437  -154.474
#> x1~~x1 -1393.770 -1480.872    17.214    27.757   -10.435   -11.275     2.627
#> x2~~x2  2715.113  -912.767    25.860    15.803    -6.259   -14.448   -12.831
#> x3~~x3 -1032.219  2739.681    14.433    17.586    14.617    22.611    -2.727
#> z1~~z1    12.166    13.088 -1307.895 -1436.786    14.556    13.758    38.943
#> z2~~z2    33.191    27.773  2843.255 -1035.370    -2.926     0.292    12.432
#> z3~~z3    24.306    33.479 -1118.160  2972.149   -14.388   -17.495    34.484
#> y1~~y1     1.155     0.691     7.148     5.847 -1487.599 -1619.943     2.718
#> y2~~y2     3.596    -5.546   -12.280    -9.371  3042.780 -1161.310   -11.068
#> y3~~y3   -16.478   -12.616    -8.444   -10.839 -1243.130  2846.334     2.592
#> X~~X    1129.522  1258.403   -50.800   -57.746    62.743    65.865    -9.469
#> X~~Z    -118.616  -133.004   111.912   130.598    32.062    34.507   -51.817
#> Z~~Z     -25.908   -29.569  1157.944  1268.397    48.954    52.058   -16.930
#> Y~~Y     -29.986   -43.086   -32.830   -35.137   551.187   591.432   -13.056
#> Y~X     -290.129  -314.920   -39.931   -48.678   435.379   458.904   -71.984
#> Y~Z      -64.170   -69.124  -275.843  -285.755   396.749   432.186  -418.398
#> Y~X:Z   -291.906  -336.777  -317.599  -348.310   418.328   438.023   -76.945
#>             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.164                                                            
#> x3~1   -3192.312  8577.455                                                  
#> z1~1      42.125    47.223  7691.950                                        
#> z2~1      35.662    39.977 -3639.979  9445.822                              
#> z3~1      39.124    43.858 -3993.346 -3380.655  8930.681                    
#> y1~1    -137.944  -154.635  -144.351  -122.203  -134.067  7702.338          
#> y2~1    -113.858  -127.635  -119.147  -100.866  -110.658 -3983.535  9664.730
#> y3~1    -121.087  -135.739  -126.711  -107.270  -117.684 -4236.451 -3496.751
#> x1~~x1    14.018    15.714    49.547    41.945    46.017    -6.742    -5.565
#> x2~~x2   -27.270   -11.275    13.111    11.100    12.177     4.006     3.306
#> x3~~x3    -2.137   -16.187    31.576    26.731    29.326     5.888     4.860
#> z1~~z1    30.526    34.220   -13.105    -7.846    -8.463    -1.817    -1.500
#> z2~~z2     9.745    10.924     4.616    -5.060     4.381    -2.243    -1.852
#> z3~~z3    27.031    30.302    -7.788    -6.605   -13.272     9.408     7.765
#> y1~~y1     2.130     2.388    -4.844    -4.101    -4.499    -5.513    -2.278
#> y2~~y2    -8.676    -9.726     2.652     2.245     2.463    -2.111   -10.629
#> y3~~y3     2.032     2.277    -3.218    -2.725    -2.989    -1.643    -1.316
#> X~~X      -7.422    -8.320   -31.055   -26.290   -28.846    -2.284    -1.885
#> X~~Z     -40.618   -45.533   -39.287   -33.259   -36.488    55.734    46.003
#> Z~~Z     -13.271   -14.877     7.283     6.165     6.772   -13.172   -10.872
#> Y~~Y     -10.234   -11.472   -13.650   -11.556   -12.675    -1.274    -1.051
#> Y~X      -56.426   -63.254  -398.926  -337.720  -370.505   -34.499   -28.475
#> Y~Z     -327.970  -367.654   -71.454   -60.491   -66.367   -37.586   -31.023
#> Y~X:Z    -60.315   -67.613   -51.324   -43.449   -47.672   129.438   106.837
#>             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    8510.678                                                            
#> x1~~x1    -5.918 15644.485                                                  
#> x2~~x2     3.516  3555.646 22119.165                                        
#> x3~~x3     5.169  4015.196  2493.916 18024.329                              
#> z1~~z1    -1.595     2.197    14.407    21.157 14706.033                    
#> z2~~z2    -1.969    51.922   -22.951    23.566  3266.326 22141.544          
#> z3~~z3     8.259    13.092    42.358    18.605  3942.609  2866.642 19780.844
#> y1~~y1    -2.181    20.128    10.861    17.001    18.818    20.388    35.634
#> y2~~y2    -1.650     6.782   -18.889    29.462     2.999    10.379   -10.309
#> y3~~y3    -6.249     8.646    21.479    -5.534    12.844    -6.952     0.393
#> X~~X      -2.005   249.762   149.557   227.823    -9.817   -14.994    -6.750
#> X~~Z      48.924   -23.151   -50.086   -62.739    12.841    13.341   -27.479
#> Z~~Z     -11.562   -13.486     4.574     8.668   264.467   187.514   236.181
#> Y~~Y      -1.111    87.026    35.733    97.515    85.610    57.211    63.982
#> Y~X      -30.283  -170.685   -57.202  -129.176    33.316   -16.882     6.780
#> Y~Z      -32.993   -22.850    16.127     4.654  -137.711   -41.476  -143.601
#> Y~X:Z    113.621  -105.092  -100.893   -73.733  -101.360  -116.679  -140.977
#>           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 14745.960                                                            
#> y2~~y2  3703.920 23178.916                                                  
#> y3~~y3  4398.475  3330.801 17993.313                                        
#> X~~X      -3.198     0.763     5.287  3672.273                              
#> X~~Z       1.136     0.374    -1.842  -316.945  1819.820                    
#> Z~~Z      -4.966     4.014     4.543     0.776    44.085  3582.778          
#> Y~~Y     170.551    79.284    60.619     7.359    -0.955     8.760   759.411
#> Y~X       18.643    -9.542    11.635   120.387    36.084    -2.333    52.220
#> Y~Z      -12.941    42.373    -8.506     7.231    59.599    90.467    47.488
#> Y~X:Z    -25.587    14.883    54.346   120.907    54.425   111.309   109.091
#>              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.740                    
#> Y~Z      320.344  1596.529          
#> Y~X:Z    -63.161   -27.121  1511.215
#> 
#> $loglik
#> [1] -17493.6
#> 
#> $iterations
#> [1] 17
#> 
#> $convergence
#> [1] TRUE
#> 
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.982                  
#> Z   0.200 1.017            
#> X:Z 0.000 0.000 1.039      
#> 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.205
#> 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
#> 
# }