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.24, 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 159 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.24, approach = dblcent):
#> lavaan 0.6-20 ended normally after 159 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.24) 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.879    0.000
#>     x3              0.914      0.014   67.686    0.000
#>   Z =~          
#>     z1              1.000                             
#>     z2              0.810      0.012   65.057    0.000
#>     z3              0.881      0.013   67.575    0.000
#>   Y =~          
#>     y1              1.000                             
#>     y2              0.798      0.007  107.505    0.000
#>     y3              0.899      0.008  112.529    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.673      0.031   21.671    0.000
#>     Z               0.569      0.030   18.713    0.000
#>     X:Z             0.718      0.028   25.833    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.372    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.408    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.243    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              0.158      0.009   18.155    0.000
#>    .x2              0.162      0.007   23.143    0.000
#>    .x3              0.165      0.008   20.739    0.000
#>    .z1              0.167      0.009   18.495    0.000
#>    .z2              0.160      0.007   22.666    0.000
#>    .z3              0.158      0.008   20.762    0.000
#>    .y1              0.160      0.009   18.004    0.000
#>    .y2              0.154      0.007   22.673    0.000
#>    .y3              0.164      0.008   20.666    0.000
#>     X               0.982      0.036   27.017    0.000
#>     Z               1.017      0.038   26.925    0.000
#>    .Y               0.980      0.038   25.930    0.000
#> 
#> 
#> modsem (1.0.24) 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.879    0.000
#>     x3              0.914      0.014   67.686    0.000
#>   Z =~          
#>     z1              1.000                             
#>     z2              0.810      0.012   65.057    0.000
#>     z3              0.881      0.013   67.575    0.000
#>   Y =~          
#>     y1              1.000                             
#>     y2              0.798      0.007  107.505    0.000
#>     y3              0.899      0.008  112.529    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.673      0.031   21.671    0.000
#>     Z               0.569      0.030   18.713    0.000
#>     X:Z             0.718      0.028   25.833    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.372    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.408    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.243    0.000
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .x1              0.158      0.009   18.155    0.000
#>    .x2              0.162      0.007   23.143    0.000
#>    .x3              0.165      0.008   20.739    0.000
#>    .z1              0.167      0.009   18.495    0.000
#>    .z2              0.160      0.007   22.666    0.000
#>    .z3              0.158      0.008   20.762    0.000
#>    .y1              0.160      0.009   18.004    0.000
#>    .y2              0.154      0.007   22.673    0.000
#>    .y3              0.164      0.008   20.666    0.000
#>     X               0.982      0.036   27.017    0.000
#>     Z               1.017      0.038   26.925    0.000
#>    .Y               0.980      0.038   25.930    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  9237.059                                        
#> Z=~z3     72.658    81.858 -3031.342  8774.520                              
#> Y=~y2   -169.929  -194.537  -158.773  -172.226 23796.517                    
#> Y=~y3   -176.970  -205.721  -169.835  -183.105 -8378.334 20996.164          
#> 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.188    28.934  -126.420  -133.304    53.766
#> z2~1      76.771    83.758    21.124    24.494  -107.020  -112.848    45.516
#> z3~1      84.221    91.886    22.464    27.525  -117.405  -123.799    49.933
#> y1~1     -23.821   -26.857   -24.063   -28.575  -592.265  -629.957  -175.980
#> y2~1     -19.663   -22.169   -19.863   -23.588  1375.007  -519.996  -145.262
#> y3~1     -20.910   -23.575   -21.122   -25.084  -519.892  1206.740  -154.476
#> x1~~x1 -1393.744 -1480.829    17.212    27.753   -10.436   -11.276    17.897
#> x2~~x2  2729.012  -912.778    25.858    15.801    -6.263   -14.452   -12.877
#> x3~~x3 -1032.241  2753.198    14.433    17.586    14.611    22.604    -2.790
#> z1~~z1    12.158    13.079 -1310.349 -1439.357    14.600    13.801    38.945
#> z2~~z2    33.193    27.775  2862.411 -1038.155    -2.934     0.291    12.441
#> z3~~z3    24.304    33.477 -1120.906  2990.204   -14.418   -17.530    34.489
#> y1~~y1     1.157     0.694     7.158     5.855 -1488.330 -1620.477     2.730
#> y2~~y2     3.599    -5.544   -12.301    -9.385  3075.827 -1162.798   -11.063
#> y3~~y3   -16.483   -12.622    -8.459   -10.858 -1244.505  2873.174     2.593
#> X~~X    1121.362  1249.865   -50.680   -57.633    62.634    65.787    -9.516
#> X~~Z    -118.605  -132.991   111.861   130.547    32.052    34.495   -51.829
#> Z~~Z     -25.902   -29.561  1158.252  1268.774    48.972    52.078   -16.922
#> Y~~Y     -29.989   -43.089   -32.820   -35.125   551.357   591.625   -13.009
#> Y~X     -290.138  -314.929   -39.918   -48.667   435.300   458.820   -72.021
#> Y~Z      -64.154   -69.107  -275.672  -285.573   396.688   432.129  -418.375
#> Y~X:Z   -291.880  -336.746  -317.374  -348.077   418.247   437.936   -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   -10.023   -11.316    13.115    11.102    12.179     4.000     3.302
#> x3~~x3    -2.187    -2.371    31.581    26.735    29.329     5.882     4.855
#> z1~~z1    30.528    34.222    -7.484    -6.413    -7.036    -1.818    -1.501
#> z2~~z2     9.752    10.932     5.839     5.020     5.422    -2.251    -1.858
#> z3~~z3    27.035    30.306    -6.332    -5.360    -5.795     9.417     7.773
#> y1~~y1     2.140     2.399    -4.833    -4.092    -4.489    -0.166    -0.311
#> y2~~y2    -8.672    -9.721     2.668     2.258     2.477    -0.500    -0.302
#> y3~~y3     2.033     2.279    -3.217    -2.724    -2.988     0.128     0.105
#> X~~X      -7.459    -8.362   -30.999   -26.242   -28.789    -2.271    -1.875
#> X~~Z     -40.627   -45.543   -39.312   -33.279   -36.509    55.728    46.000
#> Z~~Z     -13.265   -14.870     7.344     6.217     6.820   -13.171   -10.872
#> Y~~Y     -10.198   -11.431   -13.587   -11.502   -12.618    -1.277    -1.054
#> Y~X      -56.455   -63.286  -398.912  -337.697  -370.468   -34.524   -28.498
#> Y~Z     -327.951  -367.632   -71.547   -60.568   -66.445   -37.604   -31.040
#> Y~X:Z    -60.315   -67.613   -51.383   -43.498   -47.720   129.448   106.853
#>             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 16015.052                                                  
#> x2~~x2     3.512  3555.650 22463.422                                        
#> x3~~x3     5.163  4015.124  2493.849 18353.835                              
#> z1~~z1    -1.596     2.191    14.408    21.160 14792.790                    
#> z2~~z2    -1.975    51.926   -22.950    23.566  3288.160 22302.464          
#> z3~~z3     8.267    13.094    42.355    18.603  3967.598  2886.194 19915.443
#> y1~~y1    -0.331    20.129    10.861    16.999    18.918    20.493    35.789
#> y2~~y2    -0.439     6.781   -18.892    29.467     3.045    10.445   -10.312
#> y3~~y3     0.345     8.647    21.479    -5.535    12.927    -6.950     0.425
#> X~~X      -1.994   264.574   158.670   239.264    -9.977   -15.254    -7.027
#> X~~Z      48.918   -23.128   -50.073   -62.724    12.904    13.415   -27.462
#> Z~~Z     -11.562   -13.492     4.569     8.662   265.436   188.440   237.237
#> Y~~Y      -1.121    87.029    35.729    97.515    85.952    57.476    64.270
#> Y~X      -30.305  -170.694   -57.209  -129.189    33.413   -16.902     6.804
#> Y~Z      -33.009   -22.870    16.113     4.636  -138.012   -41.661  -143.969
#> Y~X:Z    113.630  -105.075  -100.885   -73.729  -101.606  -117.018  -141.359
#>           y1~~y1    y2~~y2    y3~~y3      X~~X      X~~Z      Z~~Z      Y~~Y
#> X=~x2                                                                       
#> X=~x3                                                                       
#> Z=~z2                                                                       
#> Z=~z3                                                                       
#> Y=~y2                                                                       
#> Y=~y3                                                                       
#> x1~1                                                                        
#> x2~1                                                                        
#> x3~1                                                                        
#> z1~1                                                                        
#> z2~1                                                                        
#> z3~1                                                                        
#> y1~1                                                                        
#> y2~1                                                                        
#> y3~1                                                                        
#> x1~~x1                                                                      
#> x2~~x2                                                                      
#> x3~~x3                                                                      
#> z1~~z1                                                                      
#> z2~~z2                                                                      
#> z3~~z3                                                                      
#> y1~~y1 14833.469                                                            
#> y2~~y2  3729.764 23353.298                                                  
#> y3~~y3  4425.474  3353.309 18111.337                                        
#> X~~X      -3.174     0.793     5.403  3672.731                              
#> X~~Z       1.134     0.369    -1.840  -316.918  1819.778                    
#> Z~~Z      -4.975     4.026     4.553     0.793    44.777  3588.693          
#> Y~~Y     171.119    79.681    60.979     7.658    -0.965     8.773   760.606
#> Y~X       18.696    -9.546    11.692   119.435    36.082    -2.331    52.497
#> Y~Z      -12.910    42.497    -8.474     7.341    59.588    90.464    47.771
#> Y~X:Z    -25.587    14.938    54.502   120.066    54.410   111.297   109.432
#>              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.363  1596.736          
#> Y~X:Z    -63.160   -27.082  1511.685
#> 
#> $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.879       0    0.779    0.828
#> 3    X =~  x3           1 0.914     0.014  67.686       0    0.887    0.940
#> 4    Z =~  z1           1 1.000        NA      NA      NA       NA       NA
#> 5    Z =~  z2           1 0.810     0.012  65.057       0    0.786    0.835
#> 6    Z =~  z3           1 0.881     0.013  67.575       0    0.856    0.907
#> 7    Y =~  y1           1 1.000        NA      NA      NA       NA       NA
#> 8    Y =~  y2           1 0.798     0.007 107.505       0    0.784    0.813
#> 9    Y =~  y3           1 0.899     0.008 112.529       0    0.884    0.915
#> 10   Y  ~   X           1 0.673     0.031  21.671       0    0.612    0.734
#> 11   Y  ~   Z           1 0.569     0.030  18.713       0    0.509    0.628
#> 12   Y  ~ X:Z           1 0.718     0.028  25.833       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.372       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.408       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  18.155       0    0.141    0.175
#> 23  x2 ~~  x2           1 0.162     0.007  23.143       0    0.148    0.176
#> 24  x3 ~~  x3           1 0.165     0.008  20.739       0    0.149    0.180
#> 25  z1 ~~  z1           1 0.167     0.009  18.495       0    0.149    0.184
#> 26  z2 ~~  z2           1 0.160     0.007  22.666       0    0.146    0.173
#> 27  z3 ~~  z3           1 0.158     0.008  20.762       0    0.143    0.173
#> 28  y1 ~~  y1           1 0.160     0.009  18.004       0    0.142    0.177
#> 29  y2 ~~  y2           1 0.154     0.007  22.673       0    0.141    0.168
#> 30  y3 ~~  y3           1 0.164     0.008  20.666       0    0.148    0.179
#> 31   X ~~   X           1 0.982     0.036  27.017       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.925       0    0.943    1.092
#> 34   Y ~~   Y           1 0.980     0.038  25.930       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.021
#> 2          2   EM -17493.73 2.118733e-01 1.211124e-05        0.031
#> 3          3   EM -17493.68 4.938506e-02 2.823015e-06        0.047
#> 4          4   EM -17493.67 1.268418e-02 7.250719e-07        0.058
#> 5          5   EM -17493.66 9.367184e-03 5.354614e-07        0.069
#> 6          6   EM -17493.65 7.488112e-03 4.280472e-07        0.086
#> 7          7   EM -17493.65 6.004195e-03 3.432214e-07        0.097
#> 8          8   EM -17493.64 4.690767e-03 2.681412e-07        0.107
#> 9          9   EM -17493.64 3.793854e-03 2.168705e-07        0.124
#> 10        10   EM -17493.63 3.157622e-03 1.805011e-07        0.135
#> 11        11   EM -17493.63 2.741601e-03 1.567199e-07        0.145
#> 12        12   EM -17493.63 2.421743e-03 1.384357e-07        0.162
#> 13        13   EM -17493.63 2.174710e-03 1.243144e-07        0.173
#> 14        14   QN -17493.62 9.586771e-03 5.480151e-07        0.201
#> 15        15   EM -17493.61 3.147589e-03 1.799279e-07        0.218
#> 16        16   EM -17493.61 2.282860e-03 1.304968e-07        0.229
#> 17        17   EM -17493.61 1.176377e-03 6.724608e-08        0.240
#> 18        18   EM -17493.61 2.458545e-03 1.405396e-07        0.266
#> 19        19   EM -17493.61 1.850453e-03 1.057788e-07        0.276
#> 20        20   EM -17493.60 1.100100e-03 6.288585e-08        0.287
#> 21        21   EM -17493.60 7.472259e-04 4.271423e-08        0.304
#> 22        22   EM -17493.60 1.373408e-03 7.850914e-08        0.315
#> 23        23   EM -17493.60 8.674911e-04 4.958905e-08        0.325
#> 24        24   EM -17493.60 5.515758e-04 3.153015e-08        0.342
#> 25        25   EM -17493.60 1.962711e-04 1.121959e-08        0.352
#> 26        26   EM -17493.60 9.222457e-05 5.271903e-09        0.363
#> 27        27   QN -17493.60 5.352385e-04 3.059624e-08        0.421
#> 28        28   QN -17493.60 3.023233e-07 1.728194e-11        0.440
#> 29        29   EM -17493.60 1.760673e-07 1.006467e-11        0.451
#>    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
#> 
#>  
# }