1. I noticed that the default for lavaan is that all covariances among exogenous latent variables are allowed to covary (not set to zero). Is this common practice? if I maintain this default (and not set orthogonal.x= TRUE), I guess I have to report those covariances in my model, right?
2. One of these covariances gets a value grater than 1 (or actually smaller than -1), which brings the warning "covariance matrix of latent variables is not positive definite". what causes such covariance and how should I resolve it?
mod.2o <-'
# Latent variable
Chl_L =~ Chl
Sh_Chl_L =~ Sh_Chl
PP_Outlet_L =~ PP_Outlet
PP_td_in_L =~ PP_td_in
NO3_Outlet_L =~ NO3_Outlet
NO3_td_in_L =~ NO3_td_in
TNdif_L =~ TNdif
Temp_L =~ Temp
#Regrression
Chl_L ~ Sh_Chl_L + Temp_L + NO3_Outlet_L
PP_Outlet_L ~ PP_td_in_L + Chl_L
TNdif_L ~ NO3_Outlet_L + NO3_td_in_L + Chl_L
NO3_Outlet_L ~ NO3_td_in_L
#measurment error variances
Chl ~~ 0.197*Chl
Sh_Chl ~~ 0.19*Sh_Chl
PP_Outlet ~~ 0.33*PP_Outlet
PP_td_in ~~ 0.64*PP_td_in
NO3_Outlet ~~ 0.055*NO3_Outlet
NO3_td_in ~~ 0.052*NO3_td_in
TNdif ~~ 0.003*TNdif
Temp ~~ 0.02*Temp
'
# Fit model
mod.2o.fit <- sem(mod.2o, dat3, estimator = "MLR", missing = "ML.X") #, orthogonal.y = TRUE
summary(mod.2o.fit, rsq=TRUE, standardized=TRUE)
lavaan 0.6-5 ended normally after 64 iterations
Estimator ML
Optimization method NLMINB
Number of free parameters 31
Number of observations 417
Number of missing patterns 20
Model Test User Model:
Standard Robust
Test Statistic 15.700 12.656
Degrees of freedom 13 13
P-value (Chi-square) 0.266 0.475
Scaling correction factor 1.241
for the Yuan-Bentler correction (Mplus variant)
Parameter Estimates:
Information Observed
Observed information based on Hessian
Standard errors Robust.huber.white
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Chl_L =~
Chl 1.000 0.761 0.864
Sh_Chl_L =~
Sh_Chl 1.000 0.743 0.863
PP_Outlet_L =~
PP_Outlet 1.000 2.136 0.966
PP_td_in_L =~
PP_td_in 1.000 2.972 0.966
NO3_Outlet_L =~
NO3_Outlet 1.000 0.728 0.952
NO3_td_in_L =~
NO3_td_in 1.000 0.824 0.964
TNdif_L =~
TNdif 1.000 0.656 0.997
Temp_L =~
Temp 1.000 0.653 0.977
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Chl_L ~
Sh_Chl_L 1.032 0.087 11.871 0.000 1.007 1.007
Temp_L 0.201 0.064 3.129 0.002 0.172 0.172
NO3_Outlet_L 0.083 0.047 1.751 0.080 0.079 0.079
PP_Outlet_L ~
PP_td_in_L 0.288 0.085 3.397 0.001 0.401 0.401
Chl_L 1.120 0.311 3.602 0.000 0.399 0.399
TNdif_L ~
NO3_Outlet_L -1.489 0.183 -8.150 0.000 -1.654 -1.654
NO3_td_in_L 1.511 0.114 13.224 0.000 1.899 1.899
Chl_L -0.165 0.045 -3.706 0.000 -0.192 -0.192
NO3_Outlet_L ~
NO3_td_in_L 0.763 0.088 8.631 0.000 0.863 0.863
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Sh_Chl_L ~~
PP_td_in_L 0.588 0.186 3.171 0.002 0.266 0.266
NO3_td_in_L -0.016 0.029 -0.537 0.592 -0.026 -0.026
Temp_L -0.067 0.028 -2.385 0.017 -0.137 -0.137
PP_td_in_L ~~
NO3_td_in_L -0.456 0.122 -3.736 0.000 -0.186 -0.186
Temp_L 0.283 0.101 2.797 0.005 0.146 0.146
NO3_td_in_L ~~
Temp_L -0.246 0.032 -7.712 0.000 -0.456 -0.456
.PP_Outlet_L ~~
.TNdif_L -0.235 0.107 -2.191 0.028 -1.433 -1.433
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Chl 1.514 0.043 34.893 0.000 1.514 1.719
.Sh_Chl 1.518 0.042 35.979 0.000 1.518 1.762
.PP_Outlet 2.450 0.129 18.924 0.000 2.450 1.108
.PP_td_in 5.294 0.165 32.126 0.000 5.294 1.720
.NO3_Outlet 0.211 0.038 5.578 0.000 0.211 0.276
.NO3_td_in 0.488 0.044 11.088 0.000 0.488 0.571
.TNdif 0.106 0.035 3.035 0.002 0.106 0.161
.Temp 2.189 0.033 66.167 0.000 2.189 3.276
.Chl_L 0.000 0.000 0.000
Sh_Chl_L 0.000 0.000 0.000
.PP_Outlet_L 0.000 0.000 0.000
PP_td_in_L 0.000 0.000 0.000
.NO3_Outlet_L 0.000 0.000 0.000
NO3_td_in_L 0.000 0.000 0.000
.TNdif_L 0.000 0.000 0.000
Temp_L 0.000 0.000 0.000
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.TNdif_L 0.010 0.023 0.023
.Chl 0.197 0.197 0.254
.Sh_Chl 0.190 0.190 0.256
.PP_Outlet 0.330 0.330 0.067
.PP_td_in 0.640 0.640 0.068
.NO3_Outlet 0.055 0.055 0.094
.NO3_td_in 0.052 0.052 0.071
.TNdif 0.003 0.003 0.007
.Temp 0.020 0.020 0.045
.Chl_L 0.007 0.070 0.094 0.925 0.011 0.011
Sh_Chl_L 0.552 0.068 8.073 0.000 1.000 1.000
.PP_Outlet_L 2.693 1.037 2.598 0.009 0.590 0.590
PP_td_in_L 8.832 1.480 5.969 0.000 1.000 1.000
.NO3_Outlet_L 0.135 0.052 2.610 0.009 0.255 0.255
NO3_td_in_L 0.679 0.111 6.092 0.000 1.000 1.000
Temp_L 0.427 0.019 22.175 0.000 1.000 1.000
R-Square:
Estimate
TNdif_L 0.977
Chl 0.746
Sh_Chl 0.744
PP_Outlet 0.933
PP_td_in 0.932
NO3_Outlet 0.906
NO3_td_in 0.929
TNdif 0.993
Temp 0.955
Chl_L 0.989
PP_Outlet_L 0.410
NO3_Outlet_L 0.745