Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: about AIC


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: about AIC
Date   Thu, 16 Jun 2011 14:19:35 -0400

Thanks, Joerg

I completely overlooked the fact the Yusvita wanted the AIC for the null model.

I prefer BIC for model comparison.  Volinsky and Rafferty (2000) found better prediction in survival models for a version of BIC that uses the number of failures (or "risk pools"), rather than the number of observations. This number is unambiguously defined for single or multiple-record data, provided there is at most one failure. For other situations, the definition of "number of failures" that should enter the formula is, to me, cloudier. See the -help- for "bic_note" for related issues.


***************
sysuse cancer, clear
stcox age drug
scalar bic_r = -2*e(ll) + log(e(N_fail))*e(rank) 
scalar bic_n = -2*e(ll) + log(e(N))*e(rank)
di "BIC-sample  count: " bic_n    _newline "BIC-failure count: " bic_r
estat ic
*****************

Ref: Volinsky CT, Raftery AE. Bayesian information criterion for censored survival models. Biometrics. 2000;56:256–262.

Steve
[email protected]




On Jun 16, 2011, at 10:41 AM, Joerg Luedicke wrote:

On Thu, Jun 16, 2011 at 1:32 AM, Yusvita Triwiadhian S.
<[email protected]> wrote:
> dear all,
> 
> i want to fit the model for survival analysis using AIC. How to get
> AIC for Cox proportional? because when I run -stcox- without
> independent variable, then i type -estat ic-
> it appears an error "last estimates not found".
> How to solve it?
> 

Do you get the error message "last estimates not found" after -estat
ic- or after -stcox-? You will get this message if you just typed
-stcox- in order to fit a null model. If you do that, Stata thinks you
wanted to replay the current model in memory which it does not find
then. To fit a null model, type -stcox, estimate-. The -estat ic-
command should run without error message anyhow so I assume you do not
get that error message after -estat ic-. In any case, the AIC can
easily be calculated by hand: It is -2 times the log likelihood plus 2
times the number of parameters in the model. For example after running
stcox with covariates you could type:

di -2*e(ll)+2*e(rank)

Without covariates it is just -2 times the log likelihood:

di -2*e(ll)


J.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index