Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Steven Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: about AIC |

Date |
Thu, 16 Jun 2011 15:04:37 -0400 |

I meant "at most one failure per person" not "at most one failure" Steve 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 sjsamuels@gmail.com On Jun 16, 2011, at 10:41 AM, Joerg Luedicke wrote: 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/ * * 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/

**References**:**st: about AIC***From:*"Yusvita Triwiadhian S." <07.5544@stis.ac.id>

**Re: st: about AIC***From:*Joerg Luedicke <joerg.luedicke@gmail.com>

- Prev by Date:
**st: Haussman test Question** - Next by Date:
**Re: st: Missing standard error of constant term** - Previous by thread:
**Re: st: about AIC** - Next by thread:
**st: Different results with Stata 10 and Stata 11** - Index(es):