[R] Predicted values from a logistic model

From: MANASI VYDYANATH <manasi.vydyanath_at_gmail.com>
Date: Sun, 13 May 2007 20:49:44 -0500


Hello -

I apologize if this question is simple/obvious, but I couldn't find a satisfactory answer online, and I am not very accustomed to working with R (Matlab is my poison. :-)). Any help would be greatly appreciated.

I have a model with a three-level factor and a continuous covariate. The call I use is:

mymodel <- glm(Response ~ Factor_covariate + continuous_covariate - 1, family = binomial(link = "logit"))

I would like to generate predicted values for a given level of the covariate, and a given level of the factor. For instance, I want it to give me a fitted value for the response at factor level 1 and continuous covariate value 10. How would I go about expressing this? I tried to look at the package Design, and specifically, at the command "predict.lrt". But I was unable to quite understand how I ought to enter my x-values. Again, any help would be much appreciated.

Thank you for taking the time to read this!

Cheers,

Manasi



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. Received on Mon 14 May 2007 - 01:56:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 May 2007 - 02:31:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.