[R] negative predicted values in poisson glm
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Wed Jan 18 16:52:33 CET 2006
"P. Olsson" <olsson1 at gmail.com> writes:
> Dear R helpers,
> running the following code of a glm model of the family poisson, gives
> predicted values < 0. Why?
>
> library(MASS)
> library(stats)
> library(mvtnorm)
> library(pscl)
> data(bioChemists)
> poisson_glm <- glm(art ~ fem + mar + kid5 + phd + ment, data = bioChemists,
> family = poisson)
> predicted.values = predict(poisson_glm)
> range(predicted.values)
>
>
> Thank you in advance for any hints.
The prediction is on the link scale.
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list