simsem / semTools

Useful tools for structural equation modeling
74 stars 36 forks source link

Error using htmt function #38

Closed cnlowell closed 6 years ago

cnlowell commented 6 years ago

When I run the example provided on RDocumentation (as well as my personal application that previously worked) I receive the following error:

Error in lavParseModelString(model.syntax = model, warn = warn, debug = FALSE) : 
  lavaan ERROR: model does not contain lavaan syntax (no operators found)

Do you know if this is a bug or can you help me understand the error? The example code is listed below:

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

dat <- HolzingerSwineford1939[, paste0("x", 1:9)]
htmt(dat, HS.model)

Thank you!

TDJorgensen commented 6 years ago

Have you updated your software (semTools 0.5-0, lavaan 0.6-2) and tried again in a fresh workspace? This does not return an error for me, but works as expected.

cnlowell commented 6 years ago

Yes, I have the most recent versions of semTools and lavaan. I even tried uninstalling and re-installing R. Strange. Thank you for your response!