daijiang / phyr

Functions for phylogenetic analyses
https://daijiang.github.io/phyr/
GNU General Public License v3.0
30 stars 10 forks source link

Support `emmeans` #76

Open rdinnager opened 2 years ago

rdinnager commented 2 years ago

Support the emmeans package for estimating marginal means from communityPGLMM objects. There is a vignette for developers here: https://cran.r-project.org/web/packages/emmeans/vignettes/xtending.html

On first glance this shouldn't be too difficult?

RobJamesRamos commented 7 months ago

Second this request. It should be possible to work around the lack of support by using the qdrg function in emeans. I have tried to get it to work just providing the formula, original data, coefficients, and variance-covariance matrix. I think I figured out how to get the coefficients out of the model object mod_pglmm$B[, 1]. I am not sure how to get the variance-covariance matrix out. Cant use vcv as it does not have a method for class emeans.