Re: [R] AIC for lrm(Hmisc/Design) model.

2007-05-29 Thread Frank E Harrell Jr
Milton Cezar Ribeiro wrote:
> Dear all,
> 
> I am adjusting a Logistic Regression Model using lmr() function of 
> Hmisc/Design package. Now I would like to compute AIC for this model. How can 
> I do that?
> 
> Kind regards,
> 
> miltinho
> Brazil

I like to change AIC to have it on the chi-square scale.  For that you 
can do

aic <- function(fit)
   round(unname(fit$stats['Model L.R.'] - 2*fit$stats['d.f.']),2)

f <- lrm( )
aic(f)

If unname doesn't exist in S-Plus as it does in R, you can remove that part.

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

__
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
and provide commented, minimal, self-contained, reproducible code.


[R] AIC for lrm(Hmisc/Design) model.

2007-05-29 Thread Milton Cezar Ribeiro
Dear all,

I am adjusting a Logistic Regression Model using lmr() function of Hmisc/Design 
package. Now I would like to compute AIC for this model. How can I do that?

Kind regards,

miltinho
Brazil

__


[[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
and provide commented, minimal, self-contained, reproducible code.