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: some questions regarding stcox
From
Michael McCulloch <[email protected]>
To
[email protected]
Subject
Re: st: some questions regarding stcox
Date
Fri, 4 Jun 2010 12:18:25 -0700
Moqi, here's a practical example of Maarten's strategy, in which I've
created a randomly assigned second treatment which is independent of
survival time (the studytim variable).
************
sysuse cancer, clear
stset studytim, failure(died)
ren drug drug1
gen drug2=1 + int(3*uniform()) // randomly assign another treatment,
independent of survival
stcox drug1 age drug2
test drug2
************
On Jun 4, 2010, at 6:16 AM, Maarten buis wrote:
--- On Fri, 4/6/10, XU Moqi wrote privately:
I'm only standing on my brain regarding the goodness of fit
- Imagine I have stcox a and stcox b, how do I do the test?
Note: <http://www.stata.com/support/faqs/res/statalist.html#private>
It all depends on what a and b are:
if a is something like x1 x2, and b is something like x1 x2 x3 x4,
than
I would do something like this:
stcox x1 x2 x3 x4
test x3 x4
This test the hypothesis that the coeficients fo x3 and x4 are zero.
This hypothesis is equivalent to the model -stcox x1 x2-, so it is a
test of model 2 versus model 1.
If a and b are completely different variables then it is very hard
(i.e. impossible) to compare the models, as the two models are not
nested. Stata does report BICs and AICs. However, that surprises
me a bit, as I always thought of Cox regression as not being a full
likelihood (but a partial likelihood technique) due to the fact that
we are not estimating the baseline hazard function. This would mean
that the reported likelihood isn't really a likelihood, which means
that you shouldn't be able to compute the BICs and AICs. Maybe
somebody else can confirm that the AICs and BICs are OK after
-stcox-?
-- Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/
Best wishes,
Michael McCulloch, LAc MPH PhD
Pine Street Foundation
124 Pine Street
San Anselmo, CA 94960-2674
tel: 415-407-1357
fax: 206-338-2391
*
* 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/