-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
semTools::monteCarloCI() receives an ACM without column names, it drops the error:
Error in eval(parse(text = expr[i]), envir = samples) :
object '{coefficient_name}' not foundThis error is very likely to occur when users pass external analysis (from mplus or LISREL) as the ACM is manually imported.
minimal reproducible example
# sample coefs and ACM
set.seed(1234)
coefs <- c(0.1, 0.3, 0.2)
names(coefs) <- c("a", "b", "c")
external <- matrix(
c(0.021349400, -0.000713893, -0.000529471,
NA, 3.20933e-03, -2.54593e-05,
NA, NA, 2.13524e-05
),nrow=3)
unnamed <- Matrix::forceSymmetric(external, "L")
# assign names to ACM
named <- unnamed
colnames(named) <- c("a", "b", "c")
semTools::monteCarloCI(expr = c(test = "a*b",
test2 = "a*c"),
coefs = coefs,
ACM = unnamed)previous version output
est ci.lower ci.upper
test 0.03 -0.058 0.119
test2 0.02 -0.039 0.074current version output
Error in eval(parse(text = expr[i]), envir = samples) :
object 'a' not foundMetadata
Metadata
Assignees
Labels
No labels