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: RE: Command "margin" after Cox Regression
From
Yuval Arbel <[email protected]>
To
[email protected]
Subject
Re: st: RE: Command "margin" after Cox Regression
Date
Wed, 26 Oct 2011 18:54:12 +0200
I ran the experiment I proposed before where full is obtained for
max_red=0, full1 is obtained for max_red=10 etc. What I got is that
survival rates indeed deteriorate but a very slow pace, which
correspond to a hazard rate of 1.1227. Note that the differences are
statistically significant
. collapse (mean) full full1 full2 full3 full4 full5 full6 if
fail==1,by(time_index)
. summ
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
time_index | 103 63 29.87753 12 114
full | 103 .9951255 .0492695 .4999498 1
full1 | 103 .9950817 .049276 .4998402 1
full2 | 103 .9949423 .0492972 .4994917 .9999999
full3 | 103 .994499 .0493665 .4983847 .9999997
-------------+--------------------------------------------------------
full4 | 103 .9930912 .0496077 .494879 .999999
full5 | 103 .9886374 .0505757 .4838885 .999997
full6 | 103 .9747187 .0553393 .4505192 .9999903
. ttest full==full1
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full | 103 .9951255 .0048547 .0492695 .9854963 1.004755
full1 | 103 .9950817 .0048553 .049276 .9854512 1.004712
---------+--------------------------------------------------------------------
diff | 103 .0000438 4.04e-06 .000041 .0000358 .0000518
------------------------------------------------------------------------------
mean(diff) = mean(full - full1) t = 10.8553
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
. ttest full1==full2
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full1 | 103 .9950817 .0048553 .049276 .9854512 1.004712
full2 | 103 .9949423 .0048574 .0492972 .9853077 1.004577
---------+--------------------------------------------------------------------
diff | 103 .0001394 .0000128 .0001303 .0001139 .0001649
------------------------------------------------------------------------------
mean(diff) = mean(full1 - full2) t = 10.8551
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
. ttest full2==full3
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full2 | 103 .9949423 .0048574 .0492972 .9853077 1.004577
full3 | 103 .994499 .0048642 .0493665 .9848509 1.004147
---------+--------------------------------------------------------------------
diff | 103 .0004433 .0000408 .0004142 .0003623 .0005242
------------------------------------------------------------------------------
mean(diff) = mean(full2 - full3) t = 10.8616
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
. ttest full3==full4
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full3 | 103 .994499 .0048642 .0493665 .9848509 1.004147
full4 | 103 .9930912 .004888 .0496077 .9833959 1.002786
---------+--------------------------------------------------------------------
diff | 103 .0014078 .0001294 .0013131 .0011512 .0016645
------------------------------------------------------------------------------
mean(diff) = mean(full3 - full4) t = 10.8814
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
. ttest full4==full5
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full4 | 103 .9930912 .004888 .0496077 .9833959 1.002786
full5 | 103 .9886374 .0049834 .0505757 .9787529 .9985219
---------+--------------------------------------------------------------------
diff | 103 .0044538 .0004069 .00413 .0036466 .005261
------------------------------------------------------------------------------
mean(diff) = mean(full4 - full5) t = 10.9445
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
. ttest full5==full6
Paired t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
full5 | 103 .9886374 .0049834 .0505757 .9787529 .9985219
full6 | 103 .9747187 .0054527 .0553393 .9639032 .9855342
---------+--------------------------------------------------------------------
diff | 103 .0139187 .0012487 .0126726 .011442 .0163954
------------------------------------------------------------------------------
mean(diff) = mean(full5 - full6) t = 11.1469
Ho: mean(diff) = 0 degrees of freedom = 102
Ha: mean(diff) < 0 Ha: mean(diff) != 0 Ha: mean(diff) > 0
Pr(T < t) = 1.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 0.0000
.
end of do-file
.
On Wed, Oct 26, 2011 at 5:36 PM, Weichle, Thomas <[email protected]> wrote:
> Hi Yuval,
> The predict() option for -margins- specifies the response and the
> response will be the default prediction that would be produced by
> -predict- after the underlying estimation command. For -stcox-, the
> default prediction is the hazard ratio.
>
> Based on your first margins command (margins, at(max_red=10) atmeans
> predict(nohr)), it appears as though you are predicting the hazard since
> you specified 'nohr' in the predict() option.
>
> For your second margins command (margins, at(max_red=20) atmeans
> predict(basesurv)), it appears as though you are receiving the error
> message because you specified 'basesurv' in the predict() option.
> Baseline survival is a function of time and not the beta coefficients.
>
> Tom Weichle
> Math Statistician
> Center for Management of Complex Chronic Care (CMC3)
> Hines VA Hospital, Bldg 1, C202
> 708-202-8387 ext. 24261
> [email protected]
>
> *
> * 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/
>
--
Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street, Haifa, Israel
e-mail: [email protected]
*
* 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/