[R] glms with poisson and negative binomial errors

Peter Dunn dunn at usq.edu.au
Thu Feb 22 01:36:35 CET 2007


If your data are continuous but must be positive,
consider a gamma or inverse gaussian glm.

If your data are non-negative (is positive but could
include zeros), consider glms based on Tweedie
distributions.  See, for example:
http://cran.ms.unimelb.edu.au/src/contrib/Descriptions/tweedie.html

Tweedie distributions have variances of the form 
	var[Y] = phi * mu^p
for real p not in the interval (0,1).  p=2 is the gamma case,
p=0 the normal case, p=1 and phi=1 the Poisson case.
But when 1 < p < 2, the distribution are defined on the 
non-negative reals (and in fact correspond to a Poisson
sum of gamma distributions).

P.

On Thursday 22 February 2007 05:37, Jarrett Byrnes wrote:
> A reviewer recently remarked to me that, due to my data being
> constrained to not fall below zero, a generalized linear model with a
> negative binomial error (or poisson) with a log link would be more
> appropriate for fitting my model.  I ran it in R with glm.nb() and
> got results that matched just using lm on log transformed data pretty
> well.  However, R indicated some warnings.  I checked warnings(), and
> saw a list of warnings as follows:
>
> Warning messages:
> 1: non-integer x = 0.254825
>
> I got the same error when trying to use the poisson family.
>
> My data is indeed continuous, not discrete (lots of non-integers).
>
> Does this mean that the model was not fit properly?  Was data dropped
> when fitting the model?  Is there an option to deal with this that I
> have overlooked?  It would seem all is in order, but i just wanted to
> make sure.  Thanks!
>
> Thanks.
>
> -Jarrett
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented, minimal,
> self-contained, reproducible code.

-- 
Dr Peter Dunn  |  dunn <at> usq.edu.au
Faculty of Sciences, USQ; http://www.sci.usq.edu.au/staff/dunn
Aust. Centre for Sustainable Catchments: www.usq.edu.au/acsc

This email (including any attached files) is confidential an...{{dropped}}



More information about the R-help mailing list