Skip to content

Obtaining predicted values for glm() function

1 message · David L Carlson

#
You don't show us your function call, so it is hard to be certain what the problem is. Have you read the manual page? 

?predict.glm

Have you used the newdata= argument? If not, you should know that R's ability to read your mind will not be available until the 4.0 release.


David Carlson

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of DHIMAN BHADRA
Sent: Friday, August 15, 2014 4:28 AM
To: Jeff Newmiller
Cc: r-help at r-project.org
Subject: Re: [R] Obtaining predicted values for glm() function

Thanks Jeff for the suggestion - will explore the predict function. So far
I was working on the fitted() function but it seems to generate fitted
(response) values only for predictor values in the original data set, not
for values beyond that.

I never intended to spam the mailing list. I re-posted only when I did not
find my original post in my inbox, which led to think that my query has not
reached the R-family.

Thanks again for your suggestion,
Dhiman


On Fri, Aug 15, 2014 at 11:52 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
wrote:
______________________________________________
R-help at r-project.org 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.