Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: stcox: phtest with shared frailty


From   Jeph Herrin <jherrin@flyingbuttress.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: stcox: phtest with shared frailty
Date   Tue, 06 Jun 2006 13:29:54 -0400

That works. Thanks.


Yulia Marchenko, StataCorp wrote:
Jeph Herrin <jherrin@flyingbuttress.net> reports that -estat phtest- does not
work after -stcox- with -shared-:

The Methods and Formulas documentation for for -estat phtest- describes in
detail how -stcox- shared frailty models are handled, but this doesn't seem to
actually work:

  . stcox myvar, schoenfeld(var1) shared(frailvar)

  . estat phtest
  invalid subcommand phtest
  r(321);


However, it works fine for the same model if frailty is not specified.
-stcox- does not set the required macros when -shared- is used that -estat
phtest- needs.  This will be fixed in the next update.  In the mean time, Jeph
can call -myestat_cmd-, given below, which sets the required macros before
-estat phtest-:

	capture program drop myestat_cmd
	program myestat_cmd, eclass
		global S_E_cmd2 "stcox"
		eret local estat_cmd stcox_estat
	end

	sysuse cancer, clear
	stset studytime, f(died)
	stcox age, shared(drug) schoenfeld(var1)
	myestat_cmd
	estat phtest

 -- Yulia
ymarchenko@stata.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index