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 -- View this message in context: http://www.nabble.com/%27Best-penalty%27-in-design-package-tp15082866p15082866.html Sent from the R help mailing list archive at Nabble.com.
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(.0001, 5, by=.01))) Best penalty: penalty df 1.0501 13.23308 Var1 df aic bic aic.c 1 0.0001 13.99989 337.7412 279.2214 336.8438 2 0.0101 13.98932 337.7622 279.2866 336.8661 3 0.0201 13.97886 337.7826 279.3507 336.8878 4 0.0301 13.96851 337.8025 279.4139 336.9090 5 0.0401 13.95827 337.8218 279.4760 336.9297 6 0.0501 13.94814 337.8407 279.5372 336.9498 7 0.0601 13.93812 337.8591 279.5975 336.9694 8 0.0701 13.92819 337.8769 279.6569 336.9885 9 0.0801 13.91837 337.8943 279.7153 337.0071 10 0.0901 13.90864 337.9113 279.7729 337.0253 11 0.1001 13.89901 337.9278 279.8297 337.0430 12 0.1101 13.88947 337.9439 279.8857 337.0603 13 0.1201 13.88002 337.9595 279.9408 337.0771 14 0.1301 13.87065 337.9748 279.9952 337.0935 15 0.1401 13.86138 337.9896 280.0488 337.1095 16 0.1501 13.85219 338.0041 280.1017 337.1252 17 0.1601 13.84308 338.0182 280.1539 337.1404 18 0.1701 13.83405 338.0319 280.2053 337.1552 19 0.1801 13.82511 338.0452 280.2561 337.1697 20 0.1901 13.81623 338.0583 280.3062 337.1838 21 0.2001 13.80744 338.0709 280.3556 337.1976 22 0.2101 13.79872 338.0833 280.4044 337.2110 23 0.2201 13.79007 338.0953 280.4526 337.2241 ... ... 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 -- View this message in context: http://www.nabble.com/%27Best-penalty%27-in-design-package-tp15082883p15082883.html Sent from the R help mailing list archive at Nabble.com.
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. > > TirthaDesign 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