-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I'm trying to run a simple PLS model using different combination in my data, but SEMinR throws error depending on which combination of the multi_items() I use.
For example, this code works
mm_model <- constructs(composite("TI", multi_items("TI_", 1:5)),
composite("RF", multi_items("RF_", 1:4)),
composite("IA", multi_items("IA_", 1:4)),
composite("EFFECT", multi_items("EFFNESS_", 1:4)))
sm_model <- relationships(paths(from = c("TI", "RF", "IA"), to = c("EFFECT")))
pls_model_effect <- estimate_pls(data = data,
measurement_model = mm_model,
structural_model = sm_model,
inner_weights = path_weighting)
When I change the mm_model to
mm_model <- constructs(composite("TI", multi_items("TI_", 2:5)),
composite("RF", multi_items("RF_", 1:4)),
composite("IA", multi_items("IA_", 1:4)),
composite("EFFECT", multi_items("EFFNESS_", 1:4)))
it throws this error when running estimate_pls()
Error in `data[, all_loc_non_int_items(measurement_model)]`:
! Can't subset columns with `all_loc_non_int_items(measurement_model)`.
✖ Subscript `all_loc_non_int_items(measurement_model)` must be a simple vector, not a matrix.
Backtrace:
1. seminr::estimate_pls(...)
8. rlang::cnd_signal(x)
Error in data[, all_loc_non_int_items(measurement_model)] :
✖ Subscript `all_loc_non_int_items(measurement_model)` must be a simple vector, not a matrix.
However, the following combination of the mm_model works perfectly fine
mm_model <- constructs(composite("TI", multi_items("TI_", 2:5)),
composite("RF", multi_items("RF_", 1:4)),
composite("IA", multi_items("IA_", 1:4)),
composite("EFFECT", multi_items("EFFNESS_", 2:4)))
There seems to only have problems with one specific combination of multi_items(). Do you have any ideas how to fix it?
Metadata
Metadata
Assignees
Labels
No labels