I have a problem with Beta regression in R. I need to choose a model using a process similar to stepAIC
. I am using stepGAIC
from the gamlss
package. I get this error message afetr running this code:
model <- betareg(proportion_of_completed_surveys ~ questions + readibility_lexile_survey_questions_expl, data = conference_surveys)
stepGAIC.CH(model,direction="backward", additive=TRUE)
Error in match.arg(model) : 'arg' should be one of “mean”, “precision”
Any solution would be much appreciated.
Peter
I had the same problem, so I wrote a function that could help you.
Try this:
install_github("SergioGarofalo/StepBeta")
library(StepBeta)
modelStepAIC <- step.beta(model, k = 2)
summary(modelStepAIC)
I hope this could be useful,
Sergio
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.