Hi!
I always get the same error (Error in [.data.frame(data, , var) : undefined columns selected) with the multigroup function, in SEMs that otherwise work fine with the psem function. The error in multigroup comes up when I include the last model (LC_SAFA.b_lm1) either as linear or linear mixed-effects model, but not if that model is not included in the SEM. Could you help me figure out why this error comes up based on the code below? Could it be related with too few degrees of freedom for multigroup testing, but enough degrees of freedom for psem?
Thanks in advance,
Fernando.
Code
datasets:
-balg_fa_tax has one observation per site (n=48)
-bmi_fa_all has one observation per taxa at each site (n=192)
Hi! I always get the same error (
Error in [.data.frame(data, , var) : undefined columns selected
) with the multigroup function, in SEMs that otherwise work fine with the psem function. The error in multigroup comes up when I include the last model (LC_SAFA.b_lm1) either as linear or linear mixed-effects model, but not if that model is not included in the SEM. Could you help me figure out why this error comes up based on the code below? Could it be related with too few degrees of freedom for multigroup testing, but enough degrees of freedom for psem?Thanks in advance,
Fernando.
Code datasets: -balg_fa_tax has one observation per site (n=48) -bmi_fa_all has one observation per taxa at each site (n=192)
Single models
SEM model
Multigroup test
(terr_pmultigroup <- multigroup(terr_pmodel, group = "system.x"))
Output