I am not able to make the predict values to be the same as the true means (mu). I'd expect that they should be the same. Does anybody see there anything wrong in my code?
library(MASS)
n = 10000
x = seq_len(n)/n
mu = exp(2*x)
y = rnegbin(n = n, mu = mu, theta = .1)
fit = glm.nb(y ~ mu)
plot(mu, predict(fit, type='response'))