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]

st: Re: Help stata

From   Maarten buis <>
To   stata list <>
Subject   st: Re: Help stata
Date   Wed, 27 Apr 2011 13:03:10 +0100 (BST)

--- Javaid Nauman wrote me privately:
> I am sorry to contact you directly relating help about stata.
> I had posted my question on statalist last wednesday and could
> not see the response until now, may be I am new at this and do
> not know how to manage the influx of emails from statalist in
> my account.

The solution is to try to solve that not to contact other people
because what will you do the next time you have a question? I
have no intention to become the personal post-man of everybody
who for some reason cannot sent stuff to statalist. 

Anyhow, I see two reasons why you could not sent this question to 

statalist: it was in rich text format rather than plain text and 

you included a attachment. For a detailed description of how to 

sent messages to statalist see the statalist FAQ: 


> I am trying to do a cox regression, and want to do a subgroup 

> analysis with various co-variates. Usually, in Cox, all
> variables are assigned a reference category with hazard of 1.0,
> but I have seen in different articles that mulrivariable Cox can
> give you hazard ratios of all categories in a variable.

That sounds wrong. For most models you can get estimated 

coefficients for all categories of a categorical variable if
you leave the constant out of the model. However, in a Cox model
the constant is already removed, so that is not an option.

Think of it this way, by leaving the constant out and including
all categories of a categorical variable we get separate constants
for each category. Normally (when we leave out a reference category)
the coefficients are differences (or ratios) in expected outcome, 

i.e. a comparison of groups. If you add all categories it is the 

expected outcome in each of these groups as there is no group to 

compare it with since you added all categories. In Cox regression
that would be a hazard rather than a hazard ratio.

Cox regression is special since it _only_ models how the hazard 

_changes_ when the explanatory variables change, i.e. it only
models the hazard ratios not the the baseline hazard function 

itself. This has the advantage that that way we cannot make a 

mistake in our choice of baseline hazard function, but the 

disadvantage is that it becomes hard to say something about the 

hazards themselves. The inability to include all categories of a 

categorical variable is a special case of this property. So it 

seems that you somehow misinterpreted those articles. Maybe
these articles are actually reporting interactions rather than 

the main effects of these categorical variables?


-- Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

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