[R] plot p(Y=1) vs as

Aimin Yan aiminy at iastate.edu
Sun Nov 26 06:05:18 CET 2006


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 ...



More information about the R-help mailing list