I know that for a univariate linear regression the predictions are generated like: $$\hat{y} = \beta_0 + \beta_1 x $$
And for a univariate logistic regression the predictions are generated like:
$$\hat{y} = \dfrac{1}{1+e^{-(\beta_0 + \beta_1 x)}}$$
So my question is, what is the equation for a univariate negative binomial regression, specifically one fitted by R's nb.glm function? My guess is that it's something like:
$$\hat{y} = \binom{k+\theta-1}{k} \bigg(\frac{1}{1+e^{-(\beta_0 + \beta_1 x)}}\bigg)^k\bigg(1-\frac{1}{1+e^{-(\beta_0 + \beta_1 x)}}\bigg)^\theta$$
But then I don't know how to make sense of the parameters $k$ and $\theta$
I feel I've reached the limits of my google-fu, so any help would be much appreciated.
exp(X %*% coefs)equalsfitted(model), where model is fitted using glm.nb, X is your model matrix and coefs are your regression coefficients. – Heteroskedastic Jim Jul 26 '18 at 01:52The default link for the function you call (i.e. the one that's used if you don't specify a link) is the log link as can be seen by reading the help on the function.
– Glen_b Jul 26 '18 at 02:16