[R] classification table in logistic regression

Frank E Harrell Jr f.harrell at vanderbilt.edu
Thu Jun 4 05:47:19 CEST 2009


Carbajal, Armida J wrote:
> Prof. Harrell,
> 
> My name is Armida Carbajal, I'm a graduate student intern at Sandia National Laboratories (SNL) and am conducting some research for my thesis project at the University of New Mexico in Statistics for SNL.
> 
> My project entails a logistic regression and I wanted to create a classification table like the one found in SAS using the function CTABLE. I was running out of ideas on creating code, as I am far from proficient in R. I did a google search and found this comment.
> 
> I understand the probabilities are highly arbitrary but I thought this would be useful. You see, I am studying a variable that is not understood in our process. I have derived a logistic regression and well I wanted to determine how specific and how sensitive the model was. I really didn't plan on selecting a cutoff point. I was just going to use this piece of statistical information to give the engineers interested in this information an idea of the sensitivity vs. specificity of the model so that they could decide what actions to take based on what probabilities.
> 
> I am just very curious in getting your opinion in a situation like this. Your response would be highly appreciated.
> 
> Regards,
> 
> Armida J. Carbajal
> Graduate Student Intern
> Sandia National Laboratories
> Dept of Analytical Technologies
> ajcarba at sandia.gov
> ajcarba at gmail.com
> 505-284-9854 (office)
> 
>

Armida,

I regret putting CTABLE as an option on the old SAS PROC LOGIS which was 
a basis for PROC LOGISTIC.  Classification tables are arbitrary and 
misleading so I would stay away from them.

You might build a model with and without the variable of interest and 
plot the two predicted probabilities against each other for more insight 
than what is provided by a classification table.

Frank
-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list