Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Predicted values from a logistic model

MANASI VYDYANATH

2007-05-13

Replies:

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@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.