0

I am editing my question in an attempt to provide greater clarity on my R problem. My problem is that semPaths() is not printing the Std.lv estimates. My code begins with lavaan code and then the semPaths statement is presented.

I provide R code:

library(lavaan)

lower <- '
  .32
  .42   1.35
  .42    .86   1.35
 1.11   2.46   2.02  17.98
 1.55   3.21   3.01  11.75  19.98
  .85   2.00    1.7   7.85   8.28  10.56'

jsac.cov <- 
  getCov(lower, names = c("js1", "js2", "js3", "ac1", "ac2", "ac3"))

jsac <- '
  # latent variables
    js =~ js1 + js2 + js3
    ac =~ ac1 + ac2 + ac3
 '
fit <- cfa(jsac, 
       sample.cov = jsac.cov, 
       sample.nobs = 200)
summary(fit, fit.measures = TRUE, standardize = TRUE)

library(semPlot)

#print the paths with the path coefficients
semPaths(fit, "model", "est", intercepts = FALSE)

The path coefficients plotted by the semPaths statment are labelled in the lavaan output as "Estimates". What I seek to plot are the estimates labelled in the lavaan output as "Std.lv"

Thanks.

"Mike" replied: set latent factor variances to 1.0 in the sem model (std.lv=TRUE). I tried

summary(fit, fit.measures = TRUE, std.lv = TRUE)

and obtained this syntax error

Error in .local(object, ...) : unused argument (std.lv = TRUE)
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
user2502904
  • 179
  • 4
  • 13

2 Answers2

0

set latent factor variances to 1.0 in the sem model (std.lv=TRUE).

mkearney
  • 1,266
  • 10
  • 18
  • Mike, This is what I had before: summary(fit, fit.measures = TRUE, standardize = TRUE) That ran without a syntax error. This is my attempt follow your instructions and the error message that it generates: summary(fit, fit.measures = TRUE, std.lv = TRUE) Error in .local(object, ...) : unused argument (std.lv = TRUE): – user2502904 Oct 12 '15 at 23:11
  • sorry about my lack of explanation or follow up :/. I suppose I should (a) 'finish signing up for [my] account' and (b) not post quick one-liners from my phone. baby steps! – mkearney Oct 14 '15 at 16:43
0

The "Mike" guy was right. I misunderstood. Note the third line of the cfa command that includes std.lv = TRUE. This works:

# run CFA
jsac <- '
  # latent variables
js =~ js1 + js2 + js3
ac =~ ac1 + ac2 + ac3
                      '

fit <- cfa(jsac, 
       sample.cov = jsac.cov, 
       sample.nobs = 200,std.lv = TRUE)    
summary(fit, fit.measures = TRUE)

#print the paths with the path coefficients
semPaths(fit, "model", "est", intercepts = FALSE)

Thank you "Mike" guy.

user2502904
  • 179
  • 4
  • 13