I'd recommend having a look at the lrm function in the Design package.
Looking at the examples should show you how you can product this type
of plot using some of the other components of this package.
On 26/11/06, Aimin Yan <aiminy at iastate.edu>
wrote:> I am trying to fit a logistic regression model for this data set.
> Firstly, I want to plot P(Y=1) vs As and P(Y=1) vs Aa.
> Does any body know how to do these in R.
> Thanks,
> Aimin
>
> > p5 <-
read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv")
> > str(p5)
> 'data.frame': 1030 obs. of 6 variables:
> $ P : Factor w/ 5 levels "821p","8ABP",..: 1 1 1 1 1
1 1 1 1 1 ...
> $ Aa : Factor w/ 19 levels
"ALA","ARG","ASN",..: 12 16 7 18 11 10 19 19
> 19 1 ...
> $ As : num 126.9 64.1 82.7 7.6 42.0 ...
> $ Ms : num 92.4 50.7 75.3 17.2 57.7 ...
> $ Cur: num -0.1320 -0.0977 -0.0182 0.2368 0.1306 ...
> $ Y : int 0 0 1 1 0 0 1 0 1 1 ...
>
> ______________________________________________
> 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.
>
--
================================David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP