Bookmark and Share

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]

st: RE: Understanding Factor variables - is order significant ?


From   "Kieran McCaul" <[email protected]>
To   <[email protected]>
Subject   st: RE: Understanding Factor variables - is order significant ?
Date   Wed, 26 May 2010 08:09:49 +0800

....


I think you should try -update query- and see what you get.

I'm not using Stata/MP, but the latest date for Stata/IC is 20 Apr 2010.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jesper
Lindhardsen
Sent: Wednesday, 26 May 2010 6:22 AM
To: [email protected]
Subject: st: Understanding Factor variables - is order significant ?

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/


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