[R] HowTo derive a correct likelihood-ratio chi-squared statistic from lrm() with a rsc() ?

From: Jan Verbesselt <Jan.Verbesselt_at_biw.kuleuven.be>
Date: Fri 12 Aug 2005 - 23:45:26 EST

Dear R helpers,  

>From the lrm( ) model used for binary logistic regression, we used the L.R.
model value (or the G2 value, likelihood-ratio chi-squared statistic) to evaluate the goodness-of-fit of the models. The model with the lowest G2 value consequently, has the best performance and the highest accuracy.  

However our model includes rsc() functions to account for non-linearity. We would like to penalize the L.R. model function for the non-linearity because the L.R. model value we obtain from different models are just the inverse of the derived c-index and AIC (from the lrm) (?!). So the L.R. Model is higher for the best model and not lower as explained above…  

The models:  

These are the models

                knots                      <- 5

    lrm.iRVI                              <- lrm(arson ~ rcs(iRVI,knots))

    lrm.ARND                          <- lrm(arson ~ rcs(ARND,knots))

    lrm.ARNDiRVI <- lrm(arson ~ rcs(ARND,knots)+rcs(iRVI,knots))  

and the L.R. model values are bigger, the better the model becomes (it is the inverse of our derived AIC and c-index). Normally, the best model should have the lowest G2 value.  

Could we solve this by penalizing the model or is there another way to derive a correct G2 value when rcs() functions are used in an lrm() model?  

e.g., lrm.iRVI <- lrm(arson ~ rcs(iRVI,knots), penalty=list(simple=10,nonlinear=100,nonlinear.interaction=4))

but this does not work.  

Is the AIC value a good approx for the L.R. model? (see function below)  

dAIC <- function(fit){

    logl <- oos.loglik(fit) # derive -2*logL of the model

    k <- 2

    edf <- fit$stats[4]

    # 'edf' is the equivalent degrees of freedom (i.e., the number of parameters for usul parametric models) of 'fit'.

    lrmAIC <- logl + k*edf



Best regards,


Ir. Jan Verbesselt
Research Associate
Group of Geomatics Engineering
Department Biosystems ~ M³-BIORES
Vital Decosterstraat 102, 3000 Leuven, Belgium Tel: +32-16-329750 Fax: +32-16-329760

        [[alternative HTML version deleted]]

R-help@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 Received on Sat Aug 13 00:36:31 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:16:43 EST