Error in pglmm_gaussian_internal_cpp(par = s, X, Y, Zt, St, nested, REML, :
Evaluation error: objective in x0 returns NA.
In addition: There were 41 warnings (use warnings() to see them)
My aim to examine the effect of each clade of species on a trait of interest. Any suggestions?
Sorry for the late response. Can you paste the whole example?
Also, try mod.f <- pglmm_compare(Y ~ 1 + (1|sp__)+(lineage|sp__)+ (env1|sp__), data=d2, phy = phy).
Thanks.
Hey!
I am following the simulated examples from https://leanpub.com/correlateddata/read#leanpub-auto-trait-by-environment-interactions. I was wondering if it is possible to examine the random effects of clade of each species (as a factor).
I tried with the simulated example in section 4.6 of the above link, but I keep getting the following error-
simulated data-
Simulate the data-
nspp <- 20
Simulate a phylogenetic tree
d2%>%head()
sp trait1 env1 Y lineage t7 t7 0.1155387 0.3428021 0.41741713 s1 t4 t4 -0.0228887 -0.2150611 0.05225095 s2 t8 t8 -0.4770557 0.5494478 0.43393900 s3 t9 t9 -1.1772624 0.2776693 -0.43220921 s4 t13 t13 -0.4740025 0.4773304 -0.23581239 s1 t14 t14 -1.2359375 -0.3810483 -1.48079339 s2model-
mod.f <- communityPGLMM(Y ~ 1 + (1|sp__)+(lineage|sp__)+ (env1|sp__), tree=phy, data=d2)
error-
Error in pglmm_gaussian_internal_cpp(par = s, X, Y, Zt, St, nested, REML, : Evaluation error: objective in x0 returns NA. In addition: There were 41 warnings (use warnings() to see them)
My aim to examine the effect of each clade of species on a trait of interest. Any suggestions?