Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Command "margin" after Cox Regression

From   Yuval Arbel <>
Subject   Re: st: RE: Command "margin" after Cox Regression
Date   Wed, 26 Oct 2011 18:00:01 +0200

Hi Tom and thanks for the answer.

Following your answer, the important question that bothers me,
however, is whether the command -predict(basesurv)- will be sensitive
to modifications in the values of variables:

Let me examplify. If I define, for example:

gen max_red1=max_red-20
gen max_red2=max_red-30

and then I run:

stcox max_red1
predict full1,basesurv

stcox max_red2
predict full2,basesurv
collapse (mean) full1 full2 if fail==1,by(time_index)

Does the variation from max_red1 to max_red2 modifies the calculated
survival rates?

On Wed, Oct 26, 2011 at 5:36 PM, Weichle, Thomas <> 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
> *
> *   For searches and help try:
> *
> *
> *

Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street, Haifa, Israel

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index