Dear lavaan users,
In my path analysis, I'm estimating a parameter "Abs.PM" which takes the ratio of the absolute values of other path coefficients. After fitting the model, I find that the standard error of this Abs.PM parameter is 0, so the Z score and p-value are listed as "NA".
However, if I chose standardized estimates, then the standard error appears just fine.
My questions are: (1) do you know why the raw output is not returning a standard error value for Abs.PM? and (2) Is it possible for me to obtain the SE of the raw output for Abs.PM?
Thank you for your time,
Rak
Code
library(lavaan) #v0.6-5
###:::::: Population Model ::::::###
set.seed(777)
X <- rnorm(200)
M <- 0.357*X + rnorm(200)
Y <- 0.357*M + (-.023)*X + rnorm(200)
data <- data.frame(X = X, Y = Y, M = M)
###:::::: Estimation Model ::::::###
model <- ' Y ~ direct*X
M ~ a*X
Y ~ b*M
ab := a*b
PM := ab/(ab + direct)
Abs.PM := abs(ab)/(abs(ab)+abs(direct)) '
# ML
fit <- sem(model, data = data)
parameterEstimates(fit)
standardizedSolution(fit)
Raw Output
lhs op rhs label est se z pvalue ci.lower ci.upper
1 Y ~ X direct -0.105 0.071 -1.484 0.138 -0.243 0.034
2 M ~ X a 0.300 0.076 3.942 0.000 0.151 0.450
3 Y ~ M b 0.311 0.063 4.916 0.000 0.187 0.434
4 Y ~~ Y 0.922 0.092 10.000 0.000 0.741 1.102
5 M ~~ M 1.154 0.115 10.000 0.000 0.928 1.381
6 X ~~ X 0.994 0.000 NA NA 0.994 0.994
7 ab := a*b ab 0.093 0.030 3.075 0.002 0.034 0.153
8 PM := ab/(ab+direct) PM -8.040 50.667 -0.159 0.874 -107.345 91.266
9 Abs.PM := abs(ab)/(abs(ab)+abs(direct)) Abs.PM 0.471 0.000 NA NA 0.471 0.471
Standardized output
lhs op rhs est.std se z pvalue ci.lower ci.upper
1 Y ~ X -0.103 0.069 -1.495 0.135 -0.238 0.032
2 M ~ X 0.269 0.064 4.168 0.000 0.142 0.395
3 Y ~ M 0.341 0.066 5.202 0.000 0.212 0.469
4 Y ~~ Y 0.892 0.041 21.524 0.000 0.811 0.973
5 M ~~ M 0.928 0.035 26.822 0.000 0.860 0.996
6 X ~~ X 1.000 0.000 NA NA 1.000 1.000
7 ab := a*b 0.092 0.029 3.171 0.002 0.035 0.148
8 PM := ab/(ab+direct) -8.040 50.667 -0.159 0.874 -107.345 91.266
9 Abs.PM := abs(ab)/(abs(ab)+abs(direct)) 0.471 0.174 2.710 0.007 0.130 0.811