[R] 'Best penalty' in design package
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Fri Jan 25 15:07:17 CET 2008
Tirthadeep wrote:
>
> Dear Users,
>
> In case of ridge logistic regression, i want to calculate the optimum
> penalty using aic and bic criteria. Here is the sample code:
>
> fit <- lrm(RES ~CAT01+NUM01+NUM02+CAT02+CAT03+CAT04+NUM03+CAT05+CAT06+NUM04+
> CAT07+CAT08+NUM05+NUM06, data = train.data, x = TRUE, y = TRUE)
> pentrace(fit, penalty = list(seq(.001, 5, by=.1)))
>
> output:
>
> Best penalty:
>
> penalty df
> 1.001 13.26012
>
> Var1 df aic bic aic.c
> 1 0.001 13.99894 337.7431 279.2273 336.8458
> 2 0.101 13.89814 337.9293 279.8348 337.0446
> 3 0.201 13.80665 338.0721 280.3600 337.1988
> 4 0.301 13.72260 338.1815 280.8208 337.3186
> 5 0.401 13.64461 338.2646 281.2299 337.4114
> 6 0.501 13.57167 338.3268 281.5970 337.4824
> 7 0.601 13.50297 338.3718 281.9292 337.5358
> 8 0.701 13.43791 338.4027 282.2320 337.5746
> 9 0.801 13.37600 338.4218 282.5099 337.6011
> 10 0.901 13.31685 338.4309 282.7663 337.6173
> 11 1.001 13.26012 338.4316 283.0040 337.6248
> 12 1.101 13.20556 338.4249 283.2254 337.6246
> 13 1.201 13.15295 338.4119 283.4323 337.6178
> 14 1.301 13.10208 338.3933 283.6264 337.6053
> 15 1.401 13.05282 338.3699 283.8090 337.5876
> 16 1.501 13.00501 338.3422 283.9811 337.5655
> 17 1.601 12.95854 338.3107 284.1438 337.5394
> ...
> ...
>
> I can't understand what does it mean by 'best penalty'. The aic and bic
> values corresponding to the best penalty are not minimum. Please clarify.
>
> Tirtha
Design messes with AIC and BIC (beware: BIC will usually result in
significant underfitting) by putting them in the chi-square scale
instead of -0.5 times such scale (log likelihood).
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list