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 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 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"

\(\Lambda\) – Factor loadings.

"tau"

\(\tau\) – Intercepts for indicators.

"theta"

\(\Theta\) – Residual (Co-)Variances for indicators.

"gamma.xi"

\(\Gamma_{\xi}\) – Structural coefficients between exogenous and endogenous variables.

"gamma.eta"

\(\Gamma_{\eta}\) – Structural coefficients between endogenous variables.

"omega.xi.xi"

\(\Omega_{\xi\xi}\) – Interaction effects between exogenous variables

"omega.eta.xi"

\(\Omega_{\eta\xi}\) – Interaction effects between exogenous and endogenous variables

"phi"

\(\Phi\) – (Co-)Variances among exogenous variables.

"psi"

\(\Psi\) – Residual (co-)variances among engoenous variables.

"alpha"

\(\alpha\) – Intercepts for endogenous variables

"beta0"

\(\beta_0\) – Intercepts for exogenous 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.701                                                            
#> X=~x3  -2765.304  8143.224                                                  
#> Z=~z2     63.681    74.638  9236.244                                        
#> Z=~z3     72.672    81.875 -3032.256  8773.933                              
#> Y=~y2   -169.928  -194.537  -158.897  -172.354 23795.065                    
#> Y=~y3   -176.981  -205.734  -169.962  -183.237 -8379.934 20995.278          
#> x1~1      32.765    34.317    92.187    97.631  -121.949  -132.439  8008.912
#> x2~1      26.617    26.900    72.263    76.530   -95.592  -103.815 -3632.930
#> x3~1      28.791    31.076    81.007    85.790  -107.159  -116.377 -4072.523
#> z1~1      90.688    98.943    25.014    29.834  -126.475  -133.362    53.739
#> z2~1      76.774    83.762    18.972    25.265  -107.070  -112.900    45.494
#> z3~1      84.227    91.894    23.088    25.894  -117.465  -123.861    49.911
#> y1~1     -23.830   -26.868   -24.082   -28.594  -591.822  -629.485  -175.978
#> y2~1     -19.669   -22.177   -19.877   -23.602  1373.042  -519.603  -145.251
#> y3~1     -20.918   -23.584   -21.139   -25.100  -519.697  1205.354  -154.473
#> x1~~x1 -1393.789 -1480.899    17.215    27.758   -10.436   -11.276   -12.456
#> x2~~x2  2706.779  -912.783    25.860    15.803    -6.260   -14.449   -12.842
#> x3~~x3 -1032.239  2728.642    14.434    17.587    14.616    22.610    -2.737
#> z1~~z1    12.166    13.088 -1311.114 -1440.523    14.557    13.753    38.942
#> z2~~z2    33.192    27.774  2844.836 -1038.563    -2.942     0.276    12.432
#> z3~~z3    24.306    33.480 -1121.346  2972.989   -14.427   -17.542    34.484
#> y1~~y1     1.156     0.693     7.153     5.850 -1492.670 -1626.237     2.719
#> y2~~y2     3.595    -5.547   -12.301    -9.390  3037.576 -1166.321   -11.069
#> y3~~y3   -16.478   -12.616    -8.459   -10.857 -1247.347  2838.789     2.591
#> X~~X    1135.891  1266.157   -50.893   -57.841    62.804    65.924    -9.452
#> X~~Z    -118.616  -133.005   111.923   130.607    32.067    34.512   -51.815
#> Z~~Z     -25.908   -29.569  1157.552  1267.939    48.931    52.032   -16.932
#> Y~~Y     -29.986   -43.086   -32.830   -35.141   551.045   591.253   -13.057
#> Y~X     -290.128  -314.921   -39.940   -48.686   435.444   458.969   -71.986
#> Y~Z      -64.173   -69.128  -275.894  -285.806   396.807   432.239  -418.401
#> Y~X:Z   -291.908  -336.780  -317.701  -348.413   418.384   438.077   -76.950
#>             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.203                                                            
#> x3~1   -3192.325  8577.501                                                  
#> z1~1      42.125    47.222  7691.966                                        
#> z2~1      35.662    39.977 -3639.993  9445.858                              
#> z3~1      39.124    43.858 -3993.358 -3380.666  8930.708                    
#> y1~1    -137.944  -154.635  -144.351  -122.204  -134.067  7702.348          
#> y2~1    -113.858  -127.635  -119.147  -100.866  -110.658 -3983.554  9664.771
#> y3~1    -121.087  -135.738  -126.711  -107.270  -117.684 -4236.456 -3496.754
#> x1~~x1    14.008    15.703    49.547    41.945    46.017    -6.743    -5.565
#> x2~~x2   -44.329   -11.284    13.111    11.100    12.177     4.005     3.306
#> x3~~x3    -2.145   -27.610    31.576    26.732    29.327     5.888     4.860
#> z1~~z1    30.526    34.219   -18.666    -9.323    -9.689    -1.826    -1.507
#> z2~~z2     9.745    10.925     3.385   -14.990     3.509    -2.252    -1.859
#> z3~~z3    27.031    30.302    -9.278    -7.878   -19.408     9.410     7.768
#> y1~~y1     2.131     2.389    -4.851    -4.107    -4.504   -11.215    -4.057
#> y2~~y2    -8.677    -9.726     2.652     2.245     2.464    -3.632   -21.149
#> y3~~y3     2.031     2.277    -3.224    -2.730    -2.993    -3.356    -2.690
#> X~~X      -7.409    -8.305   -31.108   -26.335   -28.903    -2.297    -1.896
#> X~~Z     -40.616   -45.531   -39.279   -33.252   -36.481    55.735    46.003
#> Z~~Z     -13.272   -14.878     7.192     6.087     6.709   -13.172   -10.872
#> Y~~Y     -10.235   -11.474   -13.683   -11.584   -12.698    -1.326    -1.092
#> Y~X      -56.428   -63.256  -398.929  -337.722  -370.508   -34.491   -28.469
#> Y~Z     -327.971  -367.657   -71.407   -60.451   -66.334   -37.584   -31.022
#> Y~X:Z    -60.318   -67.617   -51.268   -43.401   -47.632   129.429   106.830
#>             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.685                                                            
#> x1~~x1    -5.919 16016.174                                                  
#> x2~~x2     3.516  3555.699 22464.443                                        
#> x3~~x3     5.168  4015.293  2493.955 18354.888                              
#> z1~~z1    -1.601     2.197    14.407    21.157 14790.612                    
#> z2~~z2    -1.975    51.923   -22.951    23.566  3280.323 22297.563          
#> z3~~z3     8.262    13.093    42.358    18.606  3958.975  2879.833 19912.683
#> y1~~y1    -3.676    20.128    10.861    17.001    18.885    20.459    35.740
#> y2~~y2    -2.677     6.782   -18.890    29.463     3.029    10.423   -10.310
#> y3~~y3   -12.322     8.646    21.479    -5.534    12.896    -6.950     0.416
#> X~~X      -2.016   235.255   140.643   216.628   -10.091   -15.303    -7.095
#> X~~Z      48.924   -23.152   -50.087   -62.741    12.877    13.378   -27.483
#> Z~~Z     -11.562   -13.486     4.574     8.668   264.648   187.738   236.431
#> Y~~Y      -1.146    87.026    35.732    97.515    85.731    57.324    64.105
#> Y~X      -30.276  -170.686   -57.202  -129.177    33.325   -16.931     6.753
#> Y~Z      -32.990   -22.851    16.126     4.653  -137.990   -41.650  -143.916
#> Y~X:Z    113.614  -105.094  -100.894   -73.736  -101.683  -117.003  -141.366
#>           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 14830.694                                                            
#> y2~~y2  3720.772 23345.935                                                  
#> y3~~y3  4416.400  3345.358 18107.355                                        
#> X~~X      -3.251     0.738     5.301  3672.650                              
#> X~~Z       1.137     0.372    -1.841  -316.944  1819.837                    
#> Z~~Z      -4.969     4.018     4.545     0.755    44.493  3588.888          
#> Y~~Y     170.756    79.451    60.750     7.072    -0.953     8.751   760.541
#> Y~X       18.632    -9.569    11.630   120.953    36.087    -2.334    52.124
#> Y~Z      -12.950    42.435    -8.517     7.168    59.601    90.419    47.415
#> Y~X:Z    -25.631    14.893    54.393   121.452    54.431   111.268   108.934
#>              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.735                    
#> Y~Z      320.337  1596.640          
#> Y~X:Z    -63.169   -27.131  1511.575
#> 
#> $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.805       0    0.779    0.828
#> 3    X =~  x3           1 0.914     0.014  67.603       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.075       0    0.786    0.835
#> 6    Z =~  z3           1 0.881     0.013  67.602       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.521       0    0.784    0.813
#> 9    Y =~  y3           1 0.899     0.008 112.555       0    0.884    0.915
#> 10   Y  ~   X           1 0.673     0.031  21.666       0    0.612    0.734
#> 11   Y  ~   Z           1 0.569     0.030  18.710       0    0.509    0.628
#> 12   Y  ~ X:Z           1 0.718     0.028  25.828       0    0.664    0.773
#> 13  x1 ~1               1 1.023     0.024  42.772       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.557       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.382       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  18.164       0    0.141    0.175
#> 23  x2 ~~  x2           1 0.162     0.007  23.150       0    0.148    0.176
#> 24  x3 ~~  x3           1 0.165     0.008  20.750       0    0.149    0.180
#> 25  z1 ~~  z1           1 0.167     0.009  18.501       0    0.149    0.184
#> 26  z2 ~~  z2           1 0.160     0.007  22.674       0    0.146    0.173
#> 27  z3 ~~  z3           1 0.158     0.008  20.773       0    0.143    0.173
#> 28  y1 ~~  y1           1 0.160     0.009  18.008       0    0.142    0.177
#> 29  y2 ~~  y2           1 0.154     0.007  22.680       0    0.141    0.168
#> 30  y3 ~~  y3           1 0.164     0.008  20.675       0    0.148    0.179
#> 31   X ~~   X           1 0.982     0.036  26.955       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.928       0    0.943    1.092
#> 34   Y ~~   Y           1 0.980     0.038  25.932       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
#> [1] "Group1"
#> 
#> $lambda
#>        X     Z     Y
#> x1 1.000 0.000 0.000
#> x2 0.803 0.000 0.000
#> x3 0.914 0.000 0.000
#> z1 0.000 1.000 0.000
#> z2 0.000 0.810 0.000
#> z3 0.000 0.881 0.000
#> y1 0.000 0.000 1.000
#> y2 0.000 0.000 0.798
#> y3 0.000 0.000 0.899
#> 
#> $tau
#>       ~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
#> 
#> $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
#> 
#> $gamma.xi
#>       X     Z
#> Y 0.673 0.569
#> 
#> $gamma.eta
#>       Y
#> Y 0.000
#> 
#> $omega.xi.xi
#>         X     Z
#> Y~X 0.000 0.718
#> Y~Z 0.000 0.000
#> 
#> $omega.eta.xi
#>         Y
#> Y~X 0.000
#> Y~Z 0.000
#> 
#> $phi
#>       X     Z
#> X 0.982      
#> Z 0.200 1.017
#> 
#> $psi
#>       Y
#> Y 0.980
#> 
#> $alpha
#>      ~1
#> Y 0.000
#> 
#> $beta0
#>      ~1
#> X 0.000
#> Z 0.000
#> 
#> $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.701                                                            
#> X=~x3  -2765.304  8143.224                                                  
#> Z=~z2     63.681    74.638  9236.244                                        
#> Z=~z3     72.672    81.875 -3032.256  8773.933                              
#> Y=~y2   -169.928  -194.537  -158.897  -172.354 23795.065                    
#> Y=~y3   -176.981  -205.734  -169.962  -183.237 -8379.934 20995.278          
#> x1~1      32.765    34.317    92.187    97.631  -121.949  -132.439  8008.912
#> x2~1      26.617    26.900    72.263    76.530   -95.592  -103.815 -3632.930
#> x3~1      28.791    31.076    81.007    85.790  -107.159  -116.377 -4072.523
#> z1~1      90.688    98.943    25.014    29.834  -126.475  -133.362    53.739
#> z2~1      76.774    83.762    18.972    25.265  -107.070  -112.900    45.494
#> z3~1      84.227    91.894    23.088    25.894  -117.465  -123.861    49.911
#> y1~1     -23.830   -26.868   -24.082   -28.594  -591.822  -629.485  -175.978
#> y2~1     -19.669   -22.177   -19.877   -23.602  1373.042  -519.603  -145.251
#> y3~1     -20.918   -23.584   -21.139   -25.100  -519.697  1205.354  -154.473
#> x1~~x1 -1393.789 -1480.899    17.215    27.758   -10.436   -11.276   -12.456
#> x2~~x2  2706.779  -912.783    25.860    15.803    -6.260   -14.449   -12.842
#> x3~~x3 -1032.239  2728.642    14.434    17.587    14.616    22.610    -2.737
#> z1~~z1    12.166    13.088 -1311.114 -1440.523    14.557    13.753    38.942
#> z2~~z2    33.192    27.774  2844.836 -1038.563    -2.942     0.276    12.432
#> z3~~z3    24.306    33.480 -1121.346  2972.989   -14.427   -17.542    34.484
#> y1~~y1     1.156     0.693     7.153     5.850 -1492.670 -1626.237     2.719
#> y2~~y2     3.595    -5.547   -12.301    -9.390  3037.576 -1166.321   -11.069
#> y3~~y3   -16.478   -12.616    -8.459   -10.857 -1247.347  2838.789     2.591
#> X~~X    1135.891  1266.157   -50.893   -57.841    62.804    65.924    -9.452
#> X~~Z    -118.616  -133.005   111.923   130.607    32.067    34.512   -51.815
#> Z~~Z     -25.908   -29.569  1157.552  1267.939    48.931    52.032   -16.932
#> Y~~Y     -29.986   -43.086   -32.830   -35.141   551.045   591.253   -13.057
#> Y~X     -290.128  -314.921   -39.940   -48.686   435.444   458.969   -71.986
#> Y~Z      -64.173   -69.128  -275.894  -285.806   396.807   432.239  -418.401
#> Y~X:Z   -291.908  -336.780  -317.701  -348.413   418.384   438.077   -76.950
#>             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.203                                                            
#> x3~1   -3192.325  8577.501                                                  
#> z1~1      42.125    47.222  7691.966                                        
#> z2~1      35.662    39.977 -3639.993  9445.858                              
#> z3~1      39.124    43.858 -3993.358 -3380.666  8930.708                    
#> y1~1    -137.944  -154.635  -144.351  -122.204  -134.067  7702.348          
#> y2~1    -113.858  -127.635  -119.147  -100.866  -110.658 -3983.554  9664.771
#> y3~1    -121.087  -135.738  -126.711  -107.270  -117.684 -4236.456 -3496.754
#> x1~~x1    14.008    15.703    49.547    41.945    46.017    -6.743    -5.565
#> x2~~x2   -44.329   -11.284    13.111    11.100    12.177     4.005     3.306
#> x3~~x3    -2.145   -27.610    31.576    26.732    29.327     5.888     4.860
#> z1~~z1    30.526    34.219   -18.666    -9.323    -9.689    -1.826    -1.507
#> z2~~z2     9.745    10.925     3.385   -14.990     3.509    -2.252    -1.859
#> z3~~z3    27.031    30.302    -9.278    -7.878   -19.408     9.410     7.768
#> y1~~y1     2.131     2.389    -4.851    -4.107    -4.504   -11.215    -4.057
#> y2~~y2    -8.677    -9.726     2.652     2.245     2.464    -3.632   -21.149
#> y3~~y3     2.031     2.277    -3.224    -2.730    -2.993    -3.356    -2.690
#> X~~X      -7.409    -8.305   -31.108   -26.335   -28.903    -2.297    -1.896
#> X~~Z     -40.616   -45.531   -39.279   -33.252   -36.481    55.735    46.003
#> Z~~Z     -13.272   -14.878     7.192     6.087     6.709   -13.172   -10.872
#> Y~~Y     -10.235   -11.474   -13.683   -11.584   -12.698    -1.326    -1.092
#> Y~X      -56.428   -63.256  -398.929  -337.722  -370.508   -34.491   -28.469
#> Y~Z     -327.971  -367.657   -71.407   -60.451   -66.334   -37.584   -31.022
#> Y~X:Z    -60.318   -67.617   -51.268   -43.401   -47.632   129.429   106.830
#>             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.685                                                            
#> x1~~x1    -5.919 16016.174                                                  
#> x2~~x2     3.516  3555.699 22464.443                                        
#> x3~~x3     5.168  4015.293  2493.955 18354.888                              
#> z1~~z1    -1.601     2.197    14.407    21.157 14790.612                    
#> z2~~z2    -1.975    51.923   -22.951    23.566  3280.323 22297.563          
#> z3~~z3     8.262    13.093    42.358    18.606  3958.975  2879.833 19912.683
#> y1~~y1    -3.676    20.128    10.861    17.001    18.885    20.459    35.740
#> y2~~y2    -2.677     6.782   -18.890    29.463     3.029    10.423   -10.310
#> y3~~y3   -12.322     8.646    21.479    -5.534    12.896    -6.950     0.416
#> X~~X      -2.016   235.255   140.643   216.628   -10.091   -15.303    -7.095
#> X~~Z      48.924   -23.152   -50.087   -62.741    12.877    13.378   -27.483
#> Z~~Z     -11.562   -13.486     4.574     8.668   264.648   187.738   236.431
#> Y~~Y      -1.146    87.026    35.732    97.515    85.731    57.324    64.105
#> Y~X      -30.276  -170.686   -57.202  -129.177    33.325   -16.931     6.753
#> Y~Z      -32.990   -22.851    16.126     4.653  -137.990   -41.650  -143.916
#> Y~X:Z    113.614  -105.094  -100.894   -73.736  -101.683  -117.003  -141.366
#>           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 14830.694                                                            
#> y2~~y2  3720.772 23345.935                                                  
#> y3~~y3  4416.400  3345.358 18107.355                                        
#> X~~X      -3.251     0.738     5.301  3672.650                              
#> X~~Z       1.137     0.372    -1.841  -316.944  1819.837                    
#> Z~~Z      -4.969     4.018     4.545     0.755    44.493  3588.888          
#> Y~~Y     170.756    79.451    60.750     7.072    -0.953     8.751   760.541
#> Y~X       18.632    -9.569    11.630   120.953    36.087    -2.334    52.124
#> Y~Z      -12.950    42.435    -8.517     7.168    59.601    90.419    47.415
#> Y~X:Z    -25.631    14.893    54.393   121.452    54.431   111.268   108.934
#>              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.735                    
#> Y~Z      320.337  1596.640          
#> Y~X:Z    -63.169   -27.131  1511.575
#> 
#> $loglik
#> [1] -17493.6
#> 
#> $iterations
#> [1] 17
#> 
#> $convergence
#> [1] TRUE
#> 
modsem_inspect(est, what = "phi")
#>       X     Z
#> X 0.982      
#> Z 0.200 1.017
# }