Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot parameter is silently ignored for Poisson glm, and summary yields an error #13

Open
Ax3man opened this issue Mar 27, 2018 · 5 comments

Comments

@Ax3man
Copy link
Contributor

Ax3man commented Mar 27, 2018

From the help, but with Poisson:

set.seed(123456)
tre = rtree(50)
x = rTrait(n=1,phy=tre)
X = cbind(rep(1,50),x)
y = rbinTrait(n=1,phy=tre, beta=c(-1,0.5), alpha=1 ,X=X)
dat = data.frame(trait01 = y, predictor = x)

fit = phyloglm(trait01~predictor,phy=tre,data=dat,boot=100, method = 'poisson_GEE')
summary(fit)

phyloglm doesn't do anything with the bootstrapping for Poisson models, but does run the model normally. Asking for the summary then returns an error from print.summary.phyloglm:

Error in if (x$bootNrep > 0) cat("      Parametric bootstrap results based on",  : 
  argument is of length zero

presumably since it is looking for bootstrap results that aren't actually there.

@Ax3man Ax3man changed the title boot parameter is silently ignored for Poisson glm boot parameter is silently ignored for Poisson glm, and summary yields an error Mar 27, 2018
@lamho86
Copy link
Owner

lamho86 commented Mar 27, 2018

You are right. We haven't implemented bootstrap for Poisson models yet. I will do it soon.

@Ax3man
Copy link
Contributor Author

Ax3man commented Mar 27, 2018

Not a problem of course! Just mentioning it here since it is perhaps not so clear to users what is going on when this fails.

@lauterbur
Copy link

Is the bootstrap for Poisson models still in the plan? It would be a great help for evaluating these models!

@ra-barber
Copy link

Was bootstrapping ever done for these models? I'm using the bootstrap for normal phylolm and it'd be great to plot model results alongside with same method. Or is it easy to code up from inspecting the function?

@lamho86
Copy link
Owner

lamho86 commented Aug 12, 2022

Coding bootstrap for Poisson glm is straightforward. All you need is a function to simulate from the Poisson model (similar to the rTrait/rbinTrait functions). Then, you can integrate it into phyloglm just like the boostraps for logistic regression. I've got a lot on my plate, so I couldn't do it right now. Please do a pull request if you code up something and would like to add them to our package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants