Re: [R] As.Factor with Logistic Regression

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Fri 23 Jun 2006 - 01:05:05 EST

Justin Rapp wrote:
> I am modeling the probability of player succeeding in the NFL with a
> binomial logistic regression with 1 signifying success and 0
> signifying no success. I performed the regression of the binomial
> variable against overall draft position using the college conference
> for which each player played as a factor using the
> as.factor(Conference) command.
>
> My question is:
>
> How do I plot specific factors against the curve for the entire set.
> There are only a few factors that have significant coefficients and I
> would like to plot those against the logistic curve for the entire
> set.
>
> Any help would be greatly appreciated.
>

It will bias the analysis to omit insignificant factors.

To get the plots you want:

library(Hmisc); library(Design)
dd <- datadist(mydata); options(datadist='dd') f <- lrm(y ~ x1+x2+....)

plot(f, x1=NA, fun=plogis)
plot(f, x2=NA, fun=plogis)
plot(f, fun=plogis) # plot partial effects of all predictors, 
probability scale
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help@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
Received on Fri Jun 23 01:23:05 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 23 Jun 2006 - 02:12:21 EST.

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