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_canopyprod),
_lmer( grass_proportion ~ Soil_fertility+Treatment+Mean_annual_Temp+ Annual_Prep+Treatment:Annual_Prep+ (1| Farm/Plot),data= Out_canopyprod) ,
_lmer(Soil_fertility ~ Treatment+ Mean_annual_Temp+(1| Farm), data= Out_canopy_prod), data = Out_canopyprod)
_Prod.sem.boot <- bootEff(Prodpsem, 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