Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: 3 fixed effects (i,j,t)


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: Re: 3 fixed effects (i,j,t)
Date   Fri, 30 May 2003 20:49:54 -0500

----- Original Message ----- 
From: "David Ridley" <[email protected]>
To: <[email protected]>
Sent: Friday, May 30, 2003 7:49 PM
Subject: st: 3 fixed effects (i,j,t)


> Hello.
>
> I'm using xtreg and would like to have fixed effects for i, j, and t. I
> can see to use iis and tis, but can I have a third fixed effect?
>
> I have 25 months of data on 4 treatments used by 85 health insurers. My
> data looks something like this:
>
> insurer  month    treatment  price
> 01        200001    1        5
> 01        200001    2        10
> 01        200002    1        15
> 01        200002    2        20
> 02        200001    1        8
> 02        200001    2        8
>
> Thank you,
> David
>

David,
-xtreg- only controls for 1 grouping variable.  To include additional
effects you need to use dummy variables which can easily created using -xi-.
Something like this should work:

xi i.months i.treatment
xtreg depvar indepvars  _Imonth* _Itreat* , fe

hope this helps,
Scott


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index