bbolker / bbolker/mixedmodels-misc

Error in code

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
143
Forks
39
PR merge metrics
No merged PRs in 30d

Description

Dear Dr. Bolker,

Hope this email finds you well.

I have been trying to run the code on this page. The phylo_glmm code runs fine. However, the phylo_lmm code gives me the following error (though it still seems to fit a model).

In case you could let me know what I have done wrong I would be grateful.

Regards,
Guha

__________________________________________________________________________________________

CODE:::

> phylo_lmm_fit <- phylo_lmm(phen~cofactor+(1|phylo) +(1|obs),
+ data=datG,phylo=phylo,
+ control=lmerControl(check.nobs.vs.nlev="ignore",check.nobs.vs.nRE="ignore"),
+ phyloZ=phyloZ)
Warning messages:
**1: In split.default(x, g) :
data length is not a multiple of split variable
2: In split.default(seq_along(x), f, drop = drop, ...) :
data length is not a multiple of split variable**
> lme4_resLMM <- rbind(coef(summary(phylo_lmm_fit))[,1:2],
+ cbind(matrix(unlist(VarCorr(phylo_lmm_fit))),NA))
>
> phylo_lmm_fit
Linear mixed model fit by REML ['lmerMod']
REML criterion at convergence: 1563.8
Random effects:
Groups Name Std.Dev.
phylo (Intercept) 41.406
obs (Intercept) 0.443
Residual 9.690
Number of obs: 200, groups: phylo, 398; obs, 200
Fixed Effects:
(Intercept) cofactor
37.348 5.207

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.