Hi Emmanuel,

Thank you. That confirms my suspicions then. If no-one else has insights in what method would be proper here, I will switch to phylolm which provides bootstrapped CIs.

All the best,
Wouter


On 22-Sep-17 11:56, Emmanuel Paradis wrote:
Hi Wouter,

confint() uses the normal approximation of the likelihood function, not profiling. In the example you give, confint.default() is used because 'm' does not inherit the class "glm". As you wrote below, this usually gives CIs too small (as explained in ?binaryPGLMM) and symmetric whereas the likelihood function is often asymmetric.

profile(), a generic function, does profiling, but there's no method for the class "binaryPGLMM". There is a profile.glm() in MASS. binaryPGLMM() estimates the parameters by alternating between PQL and REML, so I'm not sure it makes sense to do profiling here.

HTH

Best,

Emmanuel

Le 19/09/2017 à 10:46, Wouter van der Bijl a écrit :
Hi all,

I'm successfully using ape::binaryPGLMM to fit logistic regression models while taking phylogeny into account. I can obtain the estimates, standard errors and p-values, as they are directly returned in the model object.

However, can I calculate confidence intervals for the regression coefficients?

One way to get some numbers is to define the vcov and coef functions for binaryPGLMM objects and use the standard confint function:

m <- binaryPGLMM(Y ~ X1, phy=phy, data=sim.dat) # from ?binaryPGLMM
vcov.binaryPGLMM <- function(object, ...) { object$B.cov }
coef.binaryPGLMM <- function(object, ...) { object$B[, 1] }
confint(m)

This gives us CI's, but given the fact that confint.glm uses profiling it seems unlikely to me that these numbers are correct.

If I can't figure it out, I think I will change the phylopath package to use phylolm::phyloglm instead.

Thanks for your help in advance,

Wouter

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : http://f.security-mail.net/302L2gz5JyQ



_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to