[R] Test Set Deviances

Frank E Harrell Jr f.harrell at vanderbilt.edu
Thu Mar 12 13:12:24 CET 2009

Thomas Allen wrote:
> Dear all
> I'm building logistic regression models using glm() and then
> validating their predictive ability on a test set using predict() to
> get the probabilities. I understand how to attain the deviance of the
> model fitted to the training set. But is there a way to get the
> deviance within the test set?
> Cheers
> Tom

This is essentially the index "D" reported by validate.lrm in the Design 
package.  Don't use just one test set unless it has more than 15,000 
subjects in it.  validate.lrm will do resampling for you.

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

More information about the R-help mailing list