Dear all,
I’d like to constrain all error variances to be positive. Therefore, I used the following model syntax:
m2 <- 'inhib =~ antisaccade + stopsignal + colorstroop + simon + numberstroop + arrowflanker
# constraints
antisaccade ~~ b1*antisaccade
stopsignal ~~ b2*stopsignal
colorstroop ~~ b3*colorstroop
simon ~~ b4*simon
numberstroop ~~ b5*numberstroop
arrowflanker ~~ b6*arrowflanker
b1 > 0
b2 > 0
b3 > 0
b4 > 0
b5 > 0
b6 > 0'
fit2 <- sem(m2, data=d, std.lv = TRUE)
summary(fit2, standardized = TRUE)
Variances:
Estimate |
Std.Err |
z-value |
P(>|z|) |
Std.lv |
Std.all |
||
.antisaccd |
(b1) |
379.343 |
39.876 |
9.513 |
0 |
379.343 |
0.975 |
.stopsignl |
(b2) |
369.442 |
38.835 |
9.513 |
0 |
369.442 |
0.978 |
.colorstrp |
(b3) |
73.121 |
7.686 |
9.513 |
0 |
73.121 |
0.987 |
.simon |
(b4) |
-0.000 |
NA |
-0.000 |
-0.000 |
||
.numbrstrp |
(b5) |
90.735 |
9.538 |
9.513 |
0 |
90.735 |
0.989 |
.arrwflnkr |
(b6) |
205.233 |
21.574 |
9.513 |
0 |
205.233 |
0.995 |
inhib |
1 |
1 |
1 |
Here, I got the warning that some estimated ov variances were negative, although all error variances were constrained to be positive.
How is this possible? What was false in the model syntax of m2?
Thanks in advance for all your responses!
Best,
Estimate
Std.Err
z-value
P(>|z|)
Std.lv
Std.all
.simon
(b4)
-0.000
NA
-0.000
-0.000
Here, I got the warning that some estimated ov variances were negative, although all error variances were constrained to be positive.
How is this possible? What was false in the model syntax of m2?
I assume you refer to the CI of the (negative) variance estimate of the observed variable
which CI?
Further, do you know of any lavaan-related R-function that allows the calculation of such CIs for ov variances?