Hello, I'm a grad student in the Intelligent Transportation Systems lab at Portland State Univ. in Portland, OR, USA. I'm trying to learn the basics of R to run a negative binomial in the near future, and so I ran a test regression on roadway crash data obtained from "Statistical and Econometric Methods for Transportation Data Analysis" by Washington et al (p. 250). I ran the test (glm.nb from library MASS) and got the same output as in the text for all the parameters except the overdispersion parameter; the text lists 0.516, but R gave me an overdispersion parameter output of 1.9365. (I've attached the raw dataset, in Excel .csv format, if anyone wants to try the test. If the attachment does not go through, please email me and I'll forward it on to you.) Has anyone had similar problems with the overdispersion parameter output from R? Any thoughts on this would be much appreciated. Thanks! Kartik
_______________________________________________________________________________________ I don't know the text in question, but it looks like a difference in parametrisation -- the R output is just the inverse of that from the book. -- Hong Ooi Senior Research Analyst, IAG Limited 388 George St, Sydney NSW 2000 (02) 9292 1566 -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of kartik at pdx.edu Sent: Wednesday, 23 November 2005 11:28 AM To: r-help at stat.math.ethz.ch Subject: [R] negative binomial overdispersion question Hello, I'm a grad student in the Intelligent Transportation Systems lab at Portland State Univ. in Portland, OR, USA. I'm trying to learn the basics of R to run a negative binomial in the near future, and so I ran a test regression on roadway crash data obtained from "Statistical and Econometric Methods for Transportation Data Analysis" by Washington et al (p. 250). I ran the test (glm.nb from library MASS) and got the same output as in the text for all the parameters except the overdispersion parameter; the text lists 0.516, but R gave me an overdispersion parameter output of 1.9365. (I've attached the raw dataset, in Excel .csv format, if anyone wants to try the test. If the attachment does not go through, please email me and I'll forward it on to you.) Has anyone had similar problems with the overdispersion parameter output from R? Any thoughts on this would be much appreciated. Thanks! Kartik _______________________________________________________________________________________ The information transmitted in this message and its attachme...{{dropped}}
On Tue, 22 Nov 2005 kartik at pdx.edu wrote:> Hello, > > I'm a grad student in the Intelligent Transportation Systems lab at Portland > State Univ. in Portland, OR, USA. I'm trying to learn the basics of R to run a > negative binomial in the near future, and so I ran a test regression on roadway > crash data obtained from "Statistical and Econometric Methods for > Transportation Data Analysis" by Washington et al (p. 250). I ran the test > (glm.nb from library MASS) and got the same output as in the text for all the > parameters except the overdispersion parameter; the text lists 0.516, but R > gave me an overdispersion parameter output of 1.9365. (I've attached the > raw dataset, in Excel .csv format, if anyone wants to try the test. If the > attachment does not go through, please email me and I'll forward it on to you.) > > Has anyone had similar problems with the overdispersion parameter output from R?MASS documents exactly what it does on p.206, but in no parametrization does the negative binomial have an `overdispersion' parameter in the sense used for glms (e.g. in McCullagh and Nelder). glm.nb certainly does not report an `overdispersion parameter output', so you are not reading it carefully enough. Did you consult the book whose support software you are using? That is where the detailed documentation is. My guess is that your reference has a parameter 1/theta, as 1/1.9365 is very close to 0.516. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595