Jeph Herrin <[email protected]> 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
[email protected]
*
* 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/