On Wed, 18 Jan 2006, P. Olsson wrote:

> Dear  R  helpers,
> running the following code of a glm model of the family poisson, gives
> predicted values < 0. Why?

Look at the help page for predict.glm, particularly the "type" argument. 
Then exponentiate the results.

        -thomas


>
> 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.
> Best regards,
> P. Olsson
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Thomas Lumley                   Assoc. Professor, Biostatistics
[EMAIL PROTECTED]       University of Washington, Seattle

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to