Skip to contents

Capture, colorise, and emit console text

Usage

colorize_output(
  expr,
  positive = MODSEM_COLORS$positive,
  negative = MODSEM_COLORS$negative,
  true = MODSEM_COLORS$true,
  false = MODSEM_COLORS$false,
  nan = MODSEM_COLORS$nan,
  na = MODSEM_COLORS$na,
  inf = MODSEM_COLORS$inf,
  string = MODSEM_COLORS$string,
  split = FALSE,
  append = "\n"
)

Arguments

expr

Expression or object with output which should be colorized.

positive

color of positive numbers.

negative

color of negative numbers.

true

color of TRUE.

false

color of FALSE.

nan

color of NaN.

na

color of NA.

inf

color of -Inf and Inf.

string

color of quoted strings.

split

Should output be splitted? If TRUE the output is printed normally (in real time) with no colorization, and the colored output is printed after the code has finished executing.

append

String appended after the colored output (default `\n`).

Value

Invisibly returns the *plain* captured text.

Examples

set_modsem_colors(positive = "red3",
                  negative = "red3",
                  true = "darkgreen",
                  false = "red3",
                  na = "purple",
                  string = "darkgreen")
#> [1] TRUE

m1 <- "
# Outer Model
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3
# Inner Model
  Y ~ X + Z + X:Z
"

est <- modsem(m1, data = oneInt)
colorize_output(summary(est))
#> Estimating baseline model (H0)
#> modsem (version 1.0.22, approach = dblcent):
#> 
#> Interaction Model Fit Measures (H1):
#>   Loglikelihood                              -26807.61 
#>   Akaike (AIC)                                53735.22 
#>   Bayesian (BIC)                              54071.28 
#>   Chi-square                                    122.92 
#>   Degrees of Freedom                               111 
#>   P-value (Chi-square)                           0.207 
#>   RMSEA                                          0.007 
#>   CFI                                            1.000 
#>   SRMR                                           0.008 
#> 
#> Fit Measures for Baseline Model (H0):
#>   Loglikelihood                              -27137.74 
#>   Akaike (AIC)                                54393.48 
#>   Bayesian (BIC)                              54723.93 
#>   Chi-square                                    783.18 
#>   Degrees of Freedom                               112 
#>   P-value (Chi-square)                           0.000 
#>   RMSEA                                          0.055 
#>   CFI                                            0.987 
#>   SRMR                                           0.141 
#> 
#> Comparative Fit to H0 (LRT test):
#>   Chi-square diff                              660.257 
#>   Degrees of freedom diff                            1 
#>   P-value (LRT)                                  0.000 
#> 
#> R-Squared Interaction Model (H1):
#>   Y                                              0.602 
#> R-Squared Baseline Model (H0):
#>   Y                                              0.397 
#> R-Squared Change (H1 - H0):
#>   Y                                              0.204 
#> 
#> lavaan 0.6-20 ended normally after 158 iterations
#> 
#>   Estimator                                         ML
#>   Optimization method                           NLMINB
#>   Number of model parameters                        60
#> 
#>   Number of observations                          2000
#> 
#> Model Test User Model:
#>                                                       
#>   Test statistic                               122.924
#>   Degrees of freedom                               111
#>   P-value (Chi-square)                           0.207
#> 
#> Parameter Estimates:
#> 
#>   Standard errors                             Standard
#>   Information                                 Expected
#>   Information saturated (h1) model          Structured
#> 
#> Latent Variables:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   X =~                                                
#>     x1                1.000                           
#>     x2                0.804    0.013   63.612    0.000
#>     x3                0.916    0.014   67.144    0.000
#>   Z =~                                                
#>     z1                1.000                           
#>     z2                0.812    0.013   64.763    0.000
#>     z3                0.882    0.013   67.014    0.000
#>   Y =~                                                
#>     y1                1.000                           
#>     y2                0.798    0.007  107.428    0.000
#>     y3                0.899    0.008  112.453    0.000
#>   XZ =~                                               
#>     x1z1              1.000                           
#>     x2z1              0.805    0.013   60.636    0.000
#>     x3z1              0.877    0.014   62.680    0.000
#>     x1z2              0.793    0.013   59.343    0.000
#>     x2z2              0.646    0.015   43.672    0.000
#>     x3z2              0.706    0.016   44.292    0.000
#>     x1z3              0.887    0.014   63.700    0.000
#>     x2z3              0.716    0.016   45.645    0.000
#>     x3z3              0.781    0.017   45.339    0.000
#> 
#> Regressions:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>   Y ~                                                 
#>     X                 0.675    0.027   25.379    0.000
#>     Z                 0.561    0.026   21.606    0.000
#>     XZ                0.702    0.027   26.360    0.000
#> 
#> Covariances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>  .x1z1 ~~                                             
#>    .x1z2              0.115    0.008   14.802    0.000
#>    .x1z3              0.114    0.008   13.947    0.000
#>    .x2z1              0.125    0.008   16.095    0.000
#>    .x3z1              0.140    0.009   16.135    0.000
#>  .x1z2 ~~                                             
#>    .x1z3              0.103    0.007   14.675    0.000
#>    .x2z2              0.128    0.006   20.850    0.000
#>    .x3z2              0.146    0.007   21.243    0.000
#>  .x1z3 ~~                                             
#>    .x2z3              0.116    0.007   17.818    0.000
#>    .x3z3              0.135    0.007   18.335    0.000
#>  .x2z1 ~~                                             
#>    .x2z2              0.135    0.006   20.905    0.000
#>    .x2z3              0.145    0.007   21.145    0.000
#>    .x3z1              0.114    0.007   16.058    0.000
#>  .x2z2 ~~                                             
#>    .x2z3              0.117    0.006   20.419    0.000
#>    .x3z2              0.116    0.006   20.586    0.000
#>  .x2z3 ~~                                             
#>    .x3z3              0.109    0.006   18.059    0.000
#>  .x3z1 ~~                                             
#>    .x3z2              0.138    0.007   19.331    0.000
#>    .x3z3              0.158    0.008   20.269    0.000
#>  .x3z2 ~~                                             
#>    .x3z3              0.131    0.007   19.958    0.000
#>   X ~~                                                
#>     Z                 0.201    0.024    8.271    0.000
#>     XZ                0.016    0.025    0.628    0.530
#>   Z ~~                                                
#>     XZ                0.062    0.025    2.449    0.014
#> 
#> Variances:
#>                    Estimate  Std.Err  z-value  P(>|z|)
#>    .x1                0.160    0.009   17.871    0.000
#>    .x2                0.162    0.007   22.969    0.000
#>    .x3                0.163    0.008   20.161    0.000
#>    .z1                0.168    0.009   18.143    0.000
#>    .z2                0.158    0.007   22.264    0.000
#>    .z3                0.158    0.008   20.389    0.000
#>    .y1                0.159    0.009   17.896    0.000
#>    .y2                0.154    0.007   22.640    0.000
#>    .y3                0.164    0.008   20.698    0.000
#>    .x1z1              0.311    0.014   22.227    0.000
#>    .x2z1              0.292    0.011   27.287    0.000
#>    .x3z1              0.327    0.012   26.275    0.000
#>    .x1z2              0.290    0.011   26.910    0.000
#>    .x2z2              0.239    0.008   29.770    0.000
#>    .x3z2              0.270    0.009   29.117    0.000
#>    .x1z3              0.272    0.012   23.586    0.000
#>    .x2z3              0.245    0.009   27.979    0.000
#>    .x3z3              0.297    0.011   28.154    0.000
#>     X                 0.981    0.036   26.895    0.000
#>     Z                 1.016    0.038   26.856    0.000
#>    .Y                 0.990    0.038   25.926    0.000
#>     XZ                1.045    0.044   24.004    0.000
#> 
#>  
colorize_output(est) # same as colorize_output(print(est))
#> modsem (version 1.0.22, approach = dblcent):
#> lavaan 0.6-20 ended normally after 158 iterations
#> 
#>   Estimator                                         ML
#>   Optimization method                           NLMINB
#>   Number of model parameters                        60
#> 
#>   Number of observations                          2000
#> 
#> Model Test User Model:
#>                                                       
#>   Test statistic                               122.924
#>   Degrees of freedom                               111
#>   P-value (Chi-square)                           0.207
#>  
colorize_output(modsem_inspect(est, what = "coef"))
#> $lambda
#>          X     Z     Y    XZ
#> x1   1.000 0.000 0.000 0.000
#> x2   0.804 0.000 0.000 0.000
#> x3   0.916 0.000 0.000 0.000
#> z1   0.000 1.000 0.000 0.000
#> z2   0.000 0.812 0.000 0.000
#> z3   0.000 0.882 0.000 0.000
#> y1   0.000 0.000 1.000 0.000
#> y2   0.000 0.000 0.798 0.000
#> y3   0.000 0.000 0.899 0.000
#> x1z1 0.000 0.000 0.000 1.000
#> x2z1 0.000 0.000 0.000 0.805
#> x3z1 0.000 0.000 0.000 0.877
#> x1z2 0.000 0.000 0.000 0.793
#> x2z2 0.000 0.000 0.000 0.646
#> x3z2 0.000 0.000 0.000 0.706
#> x1z3 0.000 0.000 0.000 0.887
#> x2z3 0.000 0.000 0.000 0.716
#> x3z3 0.000 0.000 0.000 0.781
#> 
#> $theta
#>         x1    x2    x3    z1    z2    z3    y1    y2    y3  x1z1  x2z1  x3z1
#> x1   0.160                                                                  
#> x2   0.000 0.162                                                            
#> x3   0.000 0.000 0.163                                                      
#> z1   0.000 0.000 0.000 0.168                                                
#> z2   0.000 0.000 0.000 0.000 0.158                                          
#> 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.159                              
#> 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                  
#> x1z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.311            
#> x2z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.125 0.292      
#> x3z1 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.140 0.114 0.327
#> x1z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.115 0.000 0.000
#> x2z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.135 0.000
#> x3z2 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.138
#> x1z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.114 0.000 0.000
#> x2z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.145 0.000
#> x3z3 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.158
#>       x1z2  x2z2  x3z2  x1z3  x2z3  x3z3
#> x1                                      
#> x2                                      
#> x3                                      
#> z1                                      
#> z2                                      
#> z3                                      
#> y1                                      
#> y2                                      
#> y3                                      
#> x1z1                                    
#> x2z1                                    
#> x3z1                                    
#> x1z2 0.290                              
#> x2z2 0.128 0.239                        
#> x3z2 0.146 0.116 0.270                  
#> x1z3 0.103 0.000 0.000 0.272            
#> x2z3 0.000 0.117 0.000 0.116 0.245      
#> x3z3 0.000 0.000 0.131 0.135 0.109 0.297
#> 
#> $psi
#>        X     Z     Y    XZ
#> X  0.981                  
#> Z  0.201 1.016            
#> Y  0.000 0.000 0.990      
#> XZ 0.016 0.062 0.000 1.045
#> 
#> $beta
#>        X     Z Y    XZ
#> X  0.000 0.000 0 0.000
#> Z  0.000 0.000 0 0.000
#> Y  0.675 0.561 0 0.702
#> XZ 0.000 0.000 0 0.000
#> 
#>  

# \dontrun{
colorize_output(split = TRUE, {
  # Get live (uncolored) output
  # And print colored output at the end of execution

  est_lms <- modsem(m1, data = oneInt, method = "lms")
  summary(est_lms)
})
#> 
#> modsem (1.0.22) ended normally after 29 iterations
#> 
#>   Estimator                                        LMS
#>   Optimization method                       EMA-NLMINB
#>   Number of model parameters                        31
#> 
#>   Number of observations                          2000
#> 
#> Loglikelihood and Information Criteria:
#>   Loglikelihood                              -17493.60
#>   Akaike (AIC)                                35049.20
#>   Bayesian (BIC)                              35222.83
#>  
#> Numerical Integration:
#>   Points of integration (per dim)                   24
#>   Dimensions                                         1
#>   Total points of integration                       24
#> 
#> Fit Measures for Baseline Model (H0):
#>                                               Standard
#>   Chi-square                                     17.52
#>   Degrees of Freedom (Chi-square)                   24
#>   P-value (Chi-square)                           0.826
#>   RMSEA                                          0.000
#>                                                       
#>   Loglikelihood                              -17831.87
#>   Akaike (AIC)                                35723.75
#>   Bayesian (BIC)                              35891.78
#>  
#> Comparative Fit to H0 (LRT test):
#>   Loglikelihood change                          338.27
#>   Difference test (D)                           676.55
#>   Degrees of freedom (D)                             1
#>   P-value (D)                                    0.000
#>  
#> R-Squared Interaction Model (H1):
#>   Y                                              0.599
#> R-Squared Baseline Model (H0):
#>   Y                                              0.395
#> R-Squared Change (H1 - H0):
#>   Y                                              0.203
#> 
#> Parameter Estimates:
#>   Coefficients                          unstandardized
#>   Information                                 observed
#>   Standard errors                             standard
#>  
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              1.000                             
#>     x2              0.803      0.013   63.750    0.000
#>     x3              0.914      0.014   67.510    0.000
#>   Z =~          
#>     z1              1.000                             
#>     z2              0.810      0.012   65.018    0.000
#>     z3              0.881      0.013   67.533    0.000
#>   Y =~          
#>     y1              1.000                             
#>     y2              0.798      0.007  107.451    0.000
#>     y3              0.899      0.008  112.470    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.673      0.031   21.667    0.000
#>     Z               0.569      0.030   18.711    0.000
#>     X:Z             0.718      0.028   25.821    0.000
#> 
#> Intercepts:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              1.023      0.024   42.774    0.000
#>    .x2              1.215      0.020   60.838    0.000
#>    .x3              0.919      0.022   41.371    0.000
#>    .z1              1.011      0.024   41.558    0.000
#>    .z2              1.206      0.020   59.251    0.000
#>    .z3              0.916      0.022   42.045    0.000
#>    .y1              1.036      0.033   31.386    0.000
#>    .y2              1.220      0.027   45.409    0.000
#>    .y3              0.953      0.030   31.790    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.200      0.024    8.242    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              0.158      0.009   17.883    0.000
#>    .x2              0.162      0.007   22.937    0.000
#>    .x3              0.165      0.008   20.507    0.000
#>    .z1              0.167      0.009   18.441    0.000
#>    .z2              0.160      0.007   22.589    0.000
#>    .z3              0.158      0.008   20.696    0.000
#>    .y1              0.160      0.009   17.952    0.000
#>    .y2              0.154      0.007   22.595    0.000
#>    .y3              0.164      0.008   20.603    0.000
#>     X               0.982      0.036   26.970    0.000
#>     Z               1.017      0.038   26.895    0.000
#>    .Y               0.980      0.038   25.909    0.000
#> 
#> 
#> modsem (1.0.22) ended normally after 29 iterations
#> 
#>   Estimator                                        LMS
#>   Optimization method                       EMA-NLMINB
#>   Number of model parameters                        31
#> 
#>   Number of observations                          2000
#> 
#> Loglikelihood and Information Criteria:
#>   Loglikelihood                              -17493.60
#>   Akaike (AIC)                                35049.20
#>   Bayesian (BIC)                              35222.83
#>  
#> Numerical Integration:
#>   Points of integration (per dim)                   24
#>   Dimensions                                         1
#>   Total points of integration                       24
#> 
#> Fit Measures for Baseline Model (H0):
#>                                               Standard
#>   Chi-square                                     17.52
#>   Degrees of Freedom (Chi-square)                   24
#>   P-value (Chi-square)                           0.826
#>   RMSEA                                          0.000
#>                                                       
#>   Loglikelihood                              -17831.87
#>   Akaike (AIC)                                35723.75
#>   Bayesian (BIC)                              35891.78
#>  
#> Comparative Fit to H0 (LRT test):
#>   Loglikelihood change                          338.27
#>   Difference test (D)                           676.55
#>   Degrees of freedom (D)                             1
#>   P-value (D)                                    0.000
#>  
#> R-Squared Interaction Model (H1):
#>   Y                                              0.599
#> R-Squared Baseline Model (H0):
#>   Y                                              0.395
#> R-Squared Change (H1 - H0):
#>   Y                                              0.203
#> 
#> Parameter Estimates:
#>   Coefficients                          unstandardized
#>   Information                                 observed
#>   Standard errors                             standard
#>  
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              1.000                             
#>     x2              0.803      0.013   63.750    0.000
#>     x3              0.914      0.014   67.510    0.000
#>   Z =~          
#>     z1              1.000                             
#>     z2              0.810      0.012   65.018    0.000
#>     z3              0.881      0.013   67.533    0.000
#>   Y =~          
#>     y1              1.000                             
#>     y2              0.798      0.007  107.451    0.000
#>     y3              0.899      0.008  112.470    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.673      0.031   21.667    0.000
#>     Z               0.569      0.030   18.711    0.000
#>     X:Z             0.718      0.028   25.821    0.000
#> 
#> Intercepts:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              1.023      0.024   42.774    0.000
#>    .x2              1.215      0.020   60.838    0.000
#>    .x3              0.919      0.022   41.371    0.000
#>    .z1              1.011      0.024   41.558    0.000
#>    .z2              1.206      0.020   59.251    0.000
#>    .z3              0.916      0.022   42.045    0.000
#>    .y1              1.036      0.033   31.386    0.000
#>    .y2              1.220      0.027   45.409    0.000
#>    .y3              0.953      0.030   31.790    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.200      0.024    8.242    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              0.158      0.009   17.883    0.000
#>    .x2              0.162      0.007   22.937    0.000
#>    .x3              0.165      0.008   20.507    0.000
#>    .z1              0.167      0.009   18.441    0.000
#>    .z2              0.160      0.007   22.589    0.000
#>    .z3              0.158      0.008   20.696    0.000
#>    .y1              0.160      0.009   17.952    0.000
#>    .y2              0.154      0.007   22.595    0.000
#>    .y3              0.164      0.008   20.603    0.000
#>     X               0.982      0.036   26.970    0.000
#>     Z               1.017      0.038   26.895    0.000
#>    .Y               0.980      0.038   25.909    0.000
#> 
#>  

colorize_output(modsem_inspect(est_lms))
#> $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.656                                                            
#> X=~x3  -2765.261  8143.172                                                  
#> Z=~z2     63.670    74.625  9231.293                                        
#> Z=~z3     72.658    81.858 -3031.955  8768.517                              
#> Y=~y2   -169.929  -194.537  -158.852  -172.301 23780.146                    
#> Y=~y3   -176.970  -205.721  -169.906  -183.172 -8379.659 20980.810          
#> x1~1      32.924    34.497    92.190    97.631  -121.932  -132.413  8008.812
#> x2~1      26.214    27.041    72.265    76.530   -95.579  -103.794 -3632.904
#> x3~1      28.931    30.713    81.008    85.790  -107.143  -116.353 -4072.472
#> z1~1      90.687    98.941    24.677    29.466  -126.449  -133.326    53.766
#> z2~1      76.771    83.758    19.862    24.949  -107.045  -112.867    45.516
#> z3~1      84.221    91.886    22.880    26.440  -117.433  -123.819    49.933
#> y1~1     -23.821   -26.857   -24.069   -28.580  -591.811  -629.432  -175.980
#> y2~1     -19.663   -22.169   -19.868   -23.591  1373.292  -519.577  -145.262
#> y3~1     -20.910   -23.575   -21.128   -25.088  -519.572  1205.367  -154.476
#> x1~~x1 -1393.744 -1480.829    17.212    27.753   -10.436   -11.276     2.771
#> x2~~x2  2715.180  -912.778    25.858    15.801    -6.263   -14.452   -12.877
#> x3~~x3 -1032.241  2739.765    14.433    17.586    14.611    22.604    -2.790
#> z1~~z1    12.158    13.079 -1307.917 -1436.710    14.572    13.774    38.945
#> z2~~z2    33.193    27.775  2844.063 -1035.582    -2.935     0.283    12.441
#> z3~~z3    24.304    33.477 -1118.298  2972.619   -14.399   -17.505    34.489
#> y1~~y1     1.157     0.694     7.151     5.850 -1487.746 -1619.906     2.730
#> y2~~y2     3.599    -5.544   -12.280    -9.370  3043.229 -1161.497   -11.063
#> y3~~y3   -16.483   -12.622    -8.448   -10.843 -1243.544  2847.123     2.593
#> X~~X    1129.559  1258.440   -50.793   -57.737    62.748    65.865    -9.516
#> X~~Z    -118.605  -132.991   111.903   130.584    32.057    34.500   -51.829
#> Z~~Z     -25.902   -29.561  1157.925  1268.336    48.954    52.054   -16.922
#> Y~~Y     -29.989   -43.089   -32.829   -35.134   551.233   591.444   -13.009
#> Y~X     -290.138  -314.929   -39.920   -48.664   435.415   458.911   -72.021
#> Y~Z      -64.154   -69.107  -275.882  -285.789   396.789   432.201  -418.375
#> Y~X:Z   -291.880  -336.746  -317.576  -348.275   418.320   437.984   -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.120                                                            
#> x3~1   -3192.281  8577.408                                                  
#> z1~1      42.146    47.245  7692.248                                        
#> z2~1      35.678    39.995 -3640.287  9446.380                              
#> z3~1      39.141    43.877 -3993.547 -3380.722  8931.022                    
#> y1~1    -137.945  -154.636  -144.365  -122.211  -134.071  7702.713          
#> y2~1    -113.867  -127.644  -119.165  -100.879  -110.668 -3983.888  9665.535
#> y3~1    -121.089  -135.740  -126.724  -107.277  -117.688 -4236.571 -3497.066
#> x1~~x1    13.958    15.647    49.551    41.948    46.018    -6.749    -5.571
#> x2~~x2   -27.131   -11.316    13.115    11.102    12.179     4.000     3.302
#> x3~~x3    -2.187   -16.041    31.581    26.735    29.329     5.882     4.855
#> z1~~z1    30.528    34.222   -13.029    -7.881    -8.501    -1.820    -1.502
#> z2~~z2     9.752    10.932     4.592    -4.986     4.358    -2.248    -1.855
#> z3~~z3    27.035    30.306    -7.817    -6.629   -13.195     9.402     7.761
#> y1~~y1     2.140     2.399    -4.836    -4.094    -4.491    -5.875    -2.092
#> y2~~y2    -8.672    -9.721     2.657     2.250     2.468    -2.014   -10.868
#> y3~~y3     2.033     2.279    -3.219    -2.725    -2.989    -1.583    -1.266
#> X~~X      -7.459    -8.362   -31.051   -26.286   -28.840    -2.286    -1.887
#> X~~Z     -40.627   -45.543   -39.312   -33.279   -36.509    55.728    46.000
#> Z~~Z     -13.265   -14.870     7.245     6.132     6.736   -13.171   -10.872
#> Y~~Y     -10.198   -11.431   -13.619   -11.529   -12.645    -1.330    -1.097
#> Y~X      -56.455   -63.286  -398.912  -337.697  -370.468   -34.524   -28.498
#> Y~Z     -327.951  -367.632   -71.494   -60.523   -66.400   -37.611   -31.046
#> Y~X:Z    -60.315   -67.613   -51.317   -43.442   -47.662   129.434   106.841
#>             y3~1    x1~~x1    x2~~x2    x3~~x3    z1~~z1    z2~~z2    z3~~z3
#> X=~x2                                                                       
#> X=~x3                                                                       
#> Z=~z2                                                                       
#> Z=~z3                                                                       
#> Y=~y2                                                                       
#> Y=~y3                                                                       
#> x1~1                                                                        
#> x2~1                                                                        
#> x3~1                                                                        
#> z1~1                                                                        
#> z2~1                                                                        
#> z3~1                                                                        
#> y1~1                                                                        
#> y2~1                                                                        
#> y3~1    8511.148                                                            
#> x1~~x1    -5.924 15643.705                                                  
#> x2~~x2     3.512  3555.650 22118.546                                        
#> x3~~x3     5.163  4015.124  2493.849 18023.716                              
#> z1~~z1    -1.597     2.191    14.408    21.160 14708.326                    
#> z2~~z2    -1.973    51.926   -22.950    23.566  3267.436 22146.756          
#> z3~~z3     8.254    13.094    42.355    18.603  3943.396  2866.873 19783.831
#> y1~~y1    -1.982    20.129    10.861    16.999    18.819    20.388    35.634
#> y2~~y2    -1.564     6.781   -18.892    29.467     3.001    10.380   -10.310
#> y3~~y3    -6.373     8.647    21.479    -5.535    12.848    -6.954     0.390
#> X~~X      -2.006   249.774   149.577   227.837    -9.813   -14.998    -6.751
#> X~~Z      48.918   -23.128   -50.073   -62.724    12.844    13.356   -27.462
#> Z~~Z     -11.562   -13.492     4.569     8.662   264.368   187.558   236.196
#> Y~~Y      -1.161    87.029    35.729    97.515    85.627    57.211    63.974
#> Y~X      -30.305  -170.694   -57.209  -129.189    33.313   -16.892     6.769
#> Y~Z      -33.015   -22.870    16.113     4.636  -137.724   -41.502  -143.618
#> Y~X:Z    113.618  -105.075  -100.885   -73.729  -101.326  -116.689  -140.970
#>           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 14748.799                                                            
#> y2~~y2  3705.270 23186.622                                                  
#> y3~~y3  4398.969  3331.958 17997.339                                        
#> X~~X      -3.198     0.763     5.289  3672.439                              
#> X~~Z       1.133     0.373    -1.842  -316.912  1819.778                    
#> Z~~Z      -4.966     4.014     4.545     0.771    44.096  3582.598          
#> Y~~Y     170.549    79.296    60.635     7.365    -0.966     8.764   759.471
#> Y~X       18.639    -9.551    11.646   120.397    36.082    -2.336    52.218
#> Y~Z      -12.953    42.370    -8.503     7.227    59.596    90.476    47.454
#> Y~X:Z    -25.593    14.881    54.366   120.898    54.431   111.287   109.120
#>              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.786                    
#> Y~Z      320.341  1596.622          
#> Y~X:Z    -63.236   -27.204  1511.324
#> 
#> $coefficients.all
#>  X=~x2  X=~x3  Z=~z2  Z=~z3  Y=~y2  Y=~y3   x1~1   x2~1   x3~1   z1~1   z2~1 
#>  0.803  0.914  0.810  0.881  0.798  0.899  1.023  1.215  0.919  1.011  1.206 
#>   z3~1   y1~1   y2~1   y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1 
#>  0.916  1.036  1.220  0.953  0.158  0.162  0.165  0.167  0.160  0.158  0.160 
#> y2~~y2 y3~~y3   X~~X   X~~Z   Z~~Z   Y~~Y    Y~X    Y~Z  Y~X:Z 
#>  0.154  0.164  0.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.206 
#>   z3~1   y1~1   y2~1   y3~1 x1~~x1 x2~~x2 x3~~x3 z1~~z1 z2~~z2 z3~~z3 y1~~y1 
#>  0.916  1.036  1.220  0.953  0.158  0.162  0.165  0.167  0.160  0.158  0.160 
#> y2~~y2 y3~~y3   X~~X   X~~Z   Z~~Z   Y~~Y    Y~X    Y~Z  Y~X:Z 
#>  0.154  0.164  0.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.510       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.018       0    0.786    0.835
#> 6    Z =~  z3           1 0.881     0.013  67.533       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.451       0    0.784    0.813
#> 9    Y =~  y3           1 0.899     0.008 112.470       0    0.884    0.915
#> 10   Y  ~   X           1 0.673     0.031  21.667       0    0.612    0.734
#> 11   Y  ~   Z           1 0.569     0.030  18.711       0    0.509    0.628
#> 12   Y  ~ X:Z           1 0.718     0.028  25.821       0    0.664    0.773
#> 13  x1 ~1               1 1.023     0.024  42.774       0    0.976    1.070
#> 14  x2 ~1               1 1.215     0.020  60.838       0    1.176    1.255
#> 15  x3 ~1               1 0.919     0.022  41.371       0    0.876    0.963
#> 16  z1 ~1               1 1.011     0.024  41.558       0    0.964    1.059
#> 17  z2 ~1               1 1.206     0.020  59.251       0    1.166    1.245
#> 18  z3 ~1               1 0.916     0.022  42.045       0    0.873    0.958
#> 19  y1 ~1               1 1.036     0.033  31.386       0    0.972    1.101
#> 20  y2 ~1               1 1.220     0.027  45.409       0    1.167    1.272
#> 21  y3 ~1               1 0.953     0.030  31.790       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.184
#> 26  z2 ~~  z2           1 0.160     0.007  22.589       0    0.146    0.173
#> 27  z3 ~~  z3           1 0.158     0.008  20.696       0    0.143    0.173
#> 28  y1 ~~  y1           1 0.160     0.009  17.952       0    0.142    0.177
#> 29  y2 ~~  y2           1 0.154     0.007  22.595       0    0.141    0.168
#> 30  y3 ~~  y3           1 0.164     0.008  20.603       0    0.148    0.179
#> 31   X ~~   X           1 0.982     0.036  26.970       0    0.911    1.053
#> 32   X ~~   Z           1 0.200     0.024   8.242       0    0.153    0.248
#> 33   Z ~~   Z           1 1.017     0.038  26.895       0    0.943    1.092
#> 34   Y ~~   Y           1 0.980     0.038  25.909       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    Z =~  z1     1    
#> 5    Z =~  z2     1    
#> 6    Z =~  z3     1    
#> 7    Y =~  y1     1    
#> 8    Y =~  y2     1    
#> 9    Y =~  y3     1    
#> 10   Y  ~   X     1    
#> 11   Y  ~   Z     1    
#> 12   Y  ~ X:Z     1    
#> 
#> $loglik
#> [1] -17493.6
#> 
#> $iterations
#> [1] 29
#> 
#> $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.206
#> z3 0.916
#> y1 1.036
#> y2 1.220
#> y3 0.953
#> 
#> $alpha
#>        ~1
#> X   0.000
#> Z   0.000
#> X:Z 0.200
#> Y   0.000
#> 
#> $beta
#>         X     Z   X:Z     Y
#> X   0.000 0.000 0.000 0.673
#> Z   0.000 0.000 0.000 0.569
#> X:Z 0.000 0.000 0.000 0.718
#> Y   0.000 0.000 0.000 0.000
#> 
#> $psi
#>         X     Z   X:Z     Y
#> X   0.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.570 0.462 0.502 1.950 1.711      
#> y3 0.696 0.560 0.636 0.642 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.570 0.596 1.950 0.618 0.497 0.565 0.570 0.462 0.502 1.950 1.711
#> y3  0.696 0.642 0.671 2.196 0.696 0.560 0.636 0.642 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.206
#> 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.206
#> 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 
#> 
#> $iteration.history
#>    iteration mode    loglik   abs.change   rel.change elapsed.time
#> 1          1   EM -17493.94          Inf          Inf        0.018
#> 2          2   EM -17493.73 2.118733e-01 1.211124e-05        0.026
#> 3          3   EM -17493.68 4.938506e-02 2.823015e-06        0.039
#> 4          4   EM -17493.67 1.268418e-02 7.250719e-07        0.047
#> 5          5   EM -17493.66 9.367184e-03 5.354614e-07        0.055
#> 6          6   EM -17493.65 7.488112e-03 4.280472e-07        0.069
#> 7          7   EM -17493.65 6.004195e-03 3.432214e-07        0.077
#> 8          8   EM -17493.64 4.690767e-03 2.681412e-07        0.085
#> 9          9   EM -17493.64 3.793854e-03 2.168705e-07        0.105
#> 10        10   EM -17493.63 3.157622e-03 1.805011e-07        0.113
#> 11        11   EM -17493.63 2.741601e-03 1.567199e-07        0.121
#> 12        12   EM -17493.63 2.421743e-03 1.384357e-07        0.135
#> 13        13   EM -17493.63 2.174710e-03 1.243144e-07        0.143
#> 14        14   QN -17493.62 9.586771e-03 5.480151e-07        0.169
#> 15        15   EM -17493.61 3.147589e-03 1.799279e-07        0.183
#> 16        16   EM -17493.61 2.282860e-03 1.304968e-07        0.192
#> 17        17   EM -17493.61 1.176377e-03 6.724608e-08        0.200
#> 18        18   EM -17493.61 2.458545e-03 1.405396e-07        0.220
#> 19        19   EM -17493.61 1.850453e-03 1.057788e-07        0.229
#> 20        20   EM -17493.60 1.100100e-03 6.288585e-08        0.237
#> 21        21   EM -17493.60 7.472258e-04 4.271423e-08        0.251
#> 22        22   EM -17493.60 1.373408e-03 7.850914e-08        0.260
#> 23        23   EM -17493.60 8.674911e-04 4.958905e-08        0.267
#> 24        24   EM -17493.60 5.515758e-04 3.153014e-08        0.281
#> 25        25   EM -17493.60 1.962711e-04 1.121959e-08        0.290
#> 26        26   EM -17493.60 9.222457e-05 5.271903e-09        0.298
#> 27        27   QN -17493.60 5.352385e-04 3.059624e-08        0.356
#> 28        28   QN -17493.60 3.023233e-07 1.728194e-11        0.372
#> 29        29   EM -17493.60 1.760709e-07 1.006487e-11        0.381
#>    expected.remaining.iterations expected.final.loglik
#> 1                             NA                    NA
#> 2                             NA                    NA
#> 3                             NA                    NA
#> 4                              4             -17493.66
#> 5                              4             -17493.66
#> 6                              5             -17493.65
#> 7                              6             -17493.64
#> 8                              6             -17493.64
#> 9                              7             -17493.63
#> 10                             7             -17493.63
#> 11                             7             -17493.63
#> 12                            11             -17493.62
#> 13                            15             -17493.62
#> 14                            38             -17493.58
#> 15                            58             -17493.56
#> 16                            69             -17493.55
#> 17                            42             -17493.58
#> 18                            54             -17493.57
#> 19                            49             -17493.57
#> 20                            28             -17493.59
#> 21                            16             -17493.60
#> 22                            14             -17493.60
#> 23                            10             -17493.60
#> 24                            13             -17493.60
#> 25                             7             -17493.60
#> 26                             0             -17493.60
#> 27                             3             -17493.60
#> 28                             0             -17493.60
#> 29                             0             -17493.60
#> 
#>  
# }