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]

From |
"Sarah Edgington" <[email protected]> |

To |
<[email protected]> |

Subject |
st: RE: Order of variables in stcox model |

Date |
Fri, 12 Aug 2011 10:35:25 -0700 |

```
.
The ordering of your variables should not matter. Are you making any
changes to the data between models? Is the data stset the same for every
model? If you run the same code more than once do you get the same results?
My suspicion is that the answer to this last question is no and the problem
actually has to do with the sort order of the data rather than the order of
the variables in the model. I have in the past run into problems with this
kind of model when the data is not sorted the same across runs. If this is
the problem you may notice that if you run the same dofile multiple times
(without changing the saved dataset it opens) that you get different
results.
-Sarah
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Brigham Whitman
Sent: Friday, August 12, 2011 9:52 AM
To: [email protected]
Subject: st: Order of variables in stcox model
Hello. I am building a model using stcox in Stata 9.2.
My question is: How should I order the variables that I put in the model? I
get different results depending on how the variables are ordered. For
example:
xi: stcox velocity roads snow i.season, nohr strata(sex age) robust
will produce different results than:
xi: stcox roads snow velocity i.season, nohr strata(sex age) robust
To be completely transparent: with my data, sometimes the order of the
variables does not matter for smaller models (less than 4 variables).
But with larger models (more than 6 variables), the results do change when
the order of the variables is changed.
What is the importance of the order of the variables (in this case, roads,
snow, velocity, and i.season) in the model?
Thank you,
Brigham Whitman
*
* 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/
*
* 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/
```

**Follow-Ups**:**Re: st: RE: Order of variables in stcox model***From:*Brigham Whitman <[email protected]>

**References**:**st: Order of variables in stcox model***From:*Brigham Whitman <[email protected]>

- Prev by Date:
**st: RE: Find the mean of observations from a variable that satisfy a condition in another variable** - Next by Date:
**Re: st: running marginsplots without rerunning margins again** - Previous by thread:
**st: Order of variables in stcox model** - Next by thread:
**Re: st: RE: Order of variables in stcox model** - Index(es):