You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello¡
I'm trying to use the BootEff() function in a psem model composed of lmer models with some interaction terms (code attached at the end). I always get this error:
Warning message:
In (function (m, w) : 1001 model fit(s) or parameter estimation(s) failed. NAs reported/generated.
It seems that BootEff is not able to estimate these models. But, if I remove the interaction terms from the lmer models within the psem, it works perfectly. The problem is not related to random effects, because even with lm() models I get the same error when there are interaction terms.
Hello¡
I'm trying to use the BootEff() function in a psem model composed of lmer models with some interaction terms (code attached at the end). I always get this error:
Warning message:
In (function (m, w) : 1001 model fit(s) or parameter estimation(s) failed. NAs reported/generated.
It seems that BootEff is not able to estimate these models. But, if I remove the interaction terms from the lmer models within the psem, it works perfectly. The problem is not related to random effects, because even with lm() models I get the same error when there are interaction terms.
Prod_psem <- psem(
lmer( Production ~ grass_proportion+
Treatment+Soil_fertility+Annual_Prep+
Treatment:Annual_Prep+
(1| Farm/Plot), data= Out_canopy_prod),
lmer( grass_proportion ~ Soil_fertility+Treatment+Mean_annual_Temp+
Annual_Prep+Treatment:Annual_Prep+
(1| Farm/Plot),data= Out_canopy_prod) ,
lmer(Soil_fertility ~ Treatment+
Mean_annual_Temp+(1| Farm),
data= Out_canopy_prod),
data = Out_canopy_prod)
Prod.sem.boot <- bootEff(Prod_psem, R = 1000, seed = 13, parallel = "snow", ran.eff = "Farm"))
Warning message:
In (function (m, w) :
1001 model fit(s) or parameter estimation(s) failed. NAs reported/generated.
I've also run the bootEff() including catch.err = FALSE and this is the error reported:
Error in contr.sum(levels(i)) :
not enough degrees of freedom to define contrasts
What goes wrong?
Thank you very much
The text was updated successfully, but these errors were encountered: