I am trying to calculate the incidence rate ratio of my negative binomial model. After running my negative binomial regression model, I use exp(Mymodel) in order to get the incidence rate ratio but R gives me this message: non-numeric argument to mathematical function.

Is the code wrong?


1 Answer 1


Try this:


Mymodel is a model object containing much more than the fitted coefficients, and some of this components are not numerical, causing the error message. The coef method just extracts the coefficients.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.