[R] back transforming output from negative binomial
Adaikalavan Ramasamy
a.ramasamy at imperial.ac.uk
Thu Oct 2 19:01:57 CEST 2008
Dear all,
I used the glm.nb with the default values from the MASS package to run a
negative binomial regression. Here is a simple example:
set.seed(123)
y <- c( rep(0, 30), rpois(70, lambda=2) )
smoke <- factor( sample( c("NO", "YES"), 100, replace=T ) )
height <- c( rnorm(30, mean=100, sd=20), rnorm(70, mean=150, sd=20) )
fit <- glm.nb( y ~ smoke + height )
coef(summary(fit))
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.34907191 0.537610710 -4.3694664 1.245505e-05
smokeYES -0.03479730 0.197627539 -0.1760751 8.602349e-01
height 0.01942373 0.003527538 5.5063142 3.664243e-08
The question now is how do I report the results, say, for height? Do I
simply take the anti logs. i.e. 1.019613 = exp(0.019423) ?
I have seen one paper where they report using anti log base 10 instead
of natural base but they use STATA though.
Please kindly advise. Thank you.
Regards, Adai
More information about the R-help
mailing list