Statalist The Stata Listserver

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

Re: st: stcox: phtest with shared frailty

From (Yulia Marchenko, StataCorp)
Subject   Re: st: stcox: phtest with shared frailty
Date   Mon, 05 Jun 2006 16:42:26 -0500

Jeph Herrin <> 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

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

 -- Yulia
*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index