I'd like to use negative binomial regression with caret. However in the list of supported models I can't find it.

I tried to use:

train(data=dataset,trControl=trainControl(method = "none"), method="glm.nb", family=binomial()) 

But this gives me an error too.

So how can I used negative binomial regression with caret?

  • $\begingroup$ Can you provide a sample dataset on which to test the implementation? $\endgroup$ Commented Apr 17, 2016 at 8:28
  • 2
    $\begingroup$ You can now specify a method of "glm.nb" in caret, which will give you a Negative Binomial GLM. $\endgroup$
    – Wendy Tate
    Commented Sep 28, 2018 at 14:17

1 Answer 1


Negative binomial regression (glm.nb) is not (yet) available in caret.

If you want to use this in caret you can use your own model in caret. How to do this is quite clearly explained on the following page of the caret documentation: http://topepo.github.io/caret/custom_models.html

Or you can ask the maintainer to add this to caret. There are a number of new model requests on the github page. But glm.nb is not among them.


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