Functions from betareg package not working

I am using the "betareg" package with R version 4.1.0. I was able to create a beta regression model, mod, but other betareg functions do not work (residuals.betareg, cooks.distance.betareg, plot.betareg, etc.). When I look at the package on my machine I can see these functions, and their documentation, but when I use them I get an error:

betareg::residuals.betareg(mod)
Error: 'residuals.betareg' is not an exported object from 'namespace:betareg'

residuals.betareg(mod)
Error in residuals.betareg(mod) :
could not find function "residuals.betareg"

I think you are supposed to just use residuals(), and stats::residuals will find out the model is betareg and delegate to residuals.betareg, and return you the expected results.

However, if you absolutely need to specify explicitly to use residuals.betareg then because its unexported you need 3 colons instead of the more typical 2.

betareg:::residuals.betareg(mod)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.