Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: about AIC


From   Joerg Luedicke <joerg.luedicke@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: about AIC
Date   Thu, 16 Jun 2011 10:41:12 -0400

On Thu, Jun 16, 2011 at 1:32 AM, Yusvita Triwiadhian S.
<07.5544@stis.ac.id> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index