Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Michael N. Mitchell" <Michael.Norman.Mitchell@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Understanding Factor variables - is order significant ? |

Date |
Tue, 25 May 2010 18:32:00 -0700 |

Dear Jesper

I hope that helps, Best luck, Michael N. Mitchell Data Management Using Stata - http://www.stata.com/bookstore/dmus.html A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html Stata tidbit of the week - http://www.MichaelNormanMitchell.com On 2010-05-25 3.22 PM, Jesper Lindhardsen wrote:

Dear Statalisters, I am having a hard time understanding why 2 regression models that differ only by the "order" of the included factor variables yield different results??? I can't (or am too slow to) find the answer in the documentation, but I think it is related to the parsing of the baselevel specifiers (see model 1 legend = _b[0o.ra#0b.dm] ???). Here are the 2 commands and resulting output - as you can see I've only changed b1.ra#b0.dm to b0.dm#b1.ra. Output has been edited, but only left out if identical between models. (System: Stata 11/MP for windows, born 10 feb 2010) 1) poisson _d b1.ra#b0.dm i.alder_k sex if ex==0, e(risk_tid) irr coeflegend _d IRR Legend ra#dm 0 0 1.487748 _b[0o.ra#0b.dm] 0 1 1.968017 _b[0.ra#1.dm] 1 1 2.787839 _b[1b.ra#1.dm] alder_k 1 6.176815 _b[1.alder_k] 2 18.09798 _b[2.alder_k] sex 2.070646 _b[sex] risk_tid (exposure) 2) poisson _d b0.dm#b1.ra i.alder_k sex if ex==0, e(risk_tid) irr coeflegend _d IRR Legend dm#ra 0 0 .5935912 _b[0b.dm#0.ra] 1 0 1.169963 _b[1.dm#0.ra] 1 1 1.65762 _b[1.dm#1b.ra] alder_k 1 6.171095 _b[1.alder_k] 2 18.07456 _b[2.alder_k] sex 2.072329 _b[sex] risk_tid (exposure) Hope its not too elementary..... Thanks you all for your contributions to statalist, it's a really valuable source of information for me. Regards, Jesper Lindhardsen MD, Ph.d. student Department of Cardiovascular Research Copenhagen University Hospital, Gentofte Denmark * * 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: Understanding Factor variables - is order significant ?***From:*Richard Williams <richardwilliams.ndu@gmail.com>

**References**:**st: Understanding Factor variables - is order significant ?***From:*"Jesper Lindhardsen" <JESLIN01@geh.regionh.dk>

- Prev by Date:
**Re: st: reshaping help** - Next by Date:
**st: Is there anything in logit similar to the absorb option in areg?** - Previous by thread:
**st: RE: Understanding Factor variables - is order significant ?** - Next by thread:
**Re: st: Understanding Factor variables - is order significant ?** - Index(es):