Statalist


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

st: R: Date: Wed, 10 Oct 2007 10:41:19 +0200


From   "Carlo Lazzaro" <[email protected]>
To   <[email protected]>
Subject   st: R: Date: Wed, 10 Oct 2007 10:41:19 +0200
Date   Wed, 10 Oct 2007 11:36:51 +0200

Peter wrote:

Dear Statalisters,

I would like to obtain the p-value (or chi2) for the test of proportional
hazard assumption for the variable 'exposed'. -return list- gives me the
chi2 for the global test, but not for the individual variables in the model.
An example:

sysuse cancer, clear
stset studytime, fail(died)
gen exposed=drug==1
stcox exposed age, sca(sca*) sch(sch*)
estat phtest, detail

I can obtain the rho for 'exposed' with -corr sca1 _t-, but I don't know how
to get the chi2. I have tried reading the source code with - viewsource
stphtest.ado- but I couldn't make it out. Can anybody help me?

Best regards,
Peter.

Dear Peter,

I have tried to run your example and as far as - estat phtest, detail - is
concerned, I have obtained what follows:


      Test of proportional hazards assumption

      Time:  Time
      ----------------------------------------------------------------
                  |       rho            chi2       df       Prob>chi2
      ------------+---------------------------------------------------
      exposed     |     -0.00949         0.00        1         0.9603
      age         |     -0.11758         0.42        1         0.5168
      ------------+---------------------------------------------------
      global test |                      0.43        2         0.8064
      ----------------------------------------------------------------


Is it what you were looking for?

Kind Regards,

Carlo


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index