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   Joerg Luedicke <[email protected]>
To   [email protected]
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.
<[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/


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