[R] Logistic regression model (Urjent help needed)
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Tue Nov 21 01:15:10 CET 2006
nitin jindal wrote:
> I am using logistic regression model (lrm) of package Design.
>
> Can some one please tell me how to calculate the average Area Under Curve
> (AUC) for n-fold cross-validation
>
> The help for lrm function says to do cross validation like this
>
> f <- lrm( cy ~ x1 + x2, x=TRUE, y=TRUE)
> val <- validate.lrm(f, method="cross", B=5)
You can just say validate( . . . ) instead of validate.lrm
>
> Now I dont know what to do with variable "val" to get the average AUC value.
Just print it and look at "index.corrected" under the Dxy row. Somer's
D rank correlation is related to AUC (C) by Dxy=2(C-.5)
Note that the default method of 'boot' works much better than
cross-validation for this purpose, and both methods assume that x1 and
x2 were the only variables or transformations examined.
Frank
>
> thnx and regards,
> nitin
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list