[R] glm() with non-integer responses

Adrian Baddeley adrian at maths.uwa.edu.au
Wed Aug 1 05:35:41 CEST 2001


A question about the inner workings of glm() and dpois():
Suppose I call

	glm(y ~ x, family=poisson, weights = w)

where y contains NON-INTEGER (but still nonnegative) values.

	(a) Does glm() still correctly maximise 
	the weighted Poisson loglikelihood ?

(i.e. the function given by the same formal expression as the 
weighted loglikelihood of independent Poisson variables Y_i 
except that the y_i are now nonnegative real numbers) 

	(b) is this likely to change in future versions of R?

In R version 1.3.0, glm() gives a warning that the responses are not integers.
This seems to originate from dpois() which is used to evaluate the deviance
of the fitted model. In R versions prior to 1.3 it seemed to work
without complaint. So ..

	(c) what is the recommended way to suppress the warning from
	dpois() that the responses are not integers ? 

Ideally I would like dpois() to accept noninteger responses and
evaluate using the gamma function..

thanks
----
Adrian Baddeley, Mathematics & Statistics, University of Western Australia
		<http://maths.uwa.edu.au/~adrian/>


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list