[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
baum <baum@bc.edu> |

To |
Nick Winter <nwinter@policystudies.com>, StataList <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Re: fixed effects and SUR |

Date |
Tue, 22 Oct 2002 11:30:03 -0400 |

Nick,

If you take a panel and reshape wide by i, you can estimate the same model on sureg, right? In my mind sureg is a panel data estimator.

. use http://fmwww.bc.edu/ec-p/data/Greene2000/TBL15-1

. tsset firm year

panel variable: firm, 1 to 5

time variable: year, 1935 to 1954

. xtreg i f c,fe

Fixed-effects (within) regression Number of obs = 100

Group variable (i) : firm Number of groups = 5

R-sq: within = 0.8003 Obs per group: min = 20

between = 0.7699 avg = 20.0

overall = 0.7782 max = 20

F(2,93) = 186.40

corr(u_i, Xb) = -0.1359 Prob > F = 0.0000

---------------------------------------------------------------------------

---

i | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+-------------------------------------------------------------

---

f | .1059799 .015891 6.67 0.000 .0744236 .1375363

c | .3466596 .0241612 14.35 0.000 .2986803 .3946388

_cons | -62.59438 29.44191 -2.13 0.036 -121.0602 -4.128578

-------------+-------------------------------------------------------------

---

sigma_u | 120.02194

sigma_e | 69.117977

rho | .75095637 (fraction of variance due to u_i)

---------------------------------------------------------------------------

---

F test that all u_i=0: F(4, 93) = 58.96 Prob > F = 0.0000

. reshape wide i f c,i(year) j(firm)

(note: j = 1 2 3 4 5)

Data long -> wide

---------------------------------------------------------------------------

--

Number of obs. 100 -> 20

Number of variables 5 -> 16

j variable (5 values) firm -> (dropped)

xij variables:

i -> i1 i2 ... i5

f -> f1 f2 ... f5

c -> c1 c2 ... c5

---------------------------------------------------------------------------

--

. forv i=1/5 {

2. local rhs "`rhs' ( i`i' f`i' c`i') "

3. }

. di "`rhs'"

( i1 f1 c1) ( i2 f2 c2) ( i3 f3 c3) ( i4 f4 c4) ( i5 f5 c5)

. sureg `rhs'

Seemingly unrelated regression

----------------------------------------------------------------------

Equation Obs Parms RMSE "R-sq" chi2 P

----------------------------------------------------------------------

i1 20 2 84.94729 0.9207 261.3219 0.0000

i2 20 2 12.36322 0.9119 207.2128 0.0000

i3 20 2 26.46612 0.6876 46.88498 0.0000

i4 20 2 9.742303 0.7264 59.14585 0.0000

i5 20 2 95.85484 0.4220 14.9687 0.0006

----------------------------------------------------------------------

---------------------------------------------------------------------------

---

| Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+-------------------------------------------------------------

---

i1 |

f1 | .120493 .0216291 5.57 0.000 .0781007 .1628853

c1 | .3827462 .032768 11.68 0.000 .318522 .4469703

_cons | -162.3641 89.45922 -1.81 0.070 -337.7009 12.97279

-------------+-------------------------------------------------------------

---

i2 |

f2 | .0695456 .0168975 4.12 0.000 .0364271 .1026641

c2 | .3085445 .0258635 11.93 0.000 .2578529 .3592362

_cons | .5043112 11.51283 0.04 0.965 -22.06042 23.06904

-------------+-------------------------------------------------------------

---

i3 |

f3 | .0372914 .0122631 3.04 0.002 .0132561 .0613268

c3 | .130783 .0220497 5.93 0.000 .0875663 .1739997

_cons | -22.43892 25.51859 -0.88 0.379 -72.45443 27.57659

-------------+-------------------------------------------------------------

---

i4 |

f4 | .0570091 .0113623 5.02 0.000 .0347395 .0792788

c4 | .0415065 .0412016 1.01 0.314 -.0392472 .1222602

_cons | 1.088878 6.258805 0.17 0.862 -11.17815 13.35591

-------------+-------------------------------------------------------------

---

i5 |

f5 | .1014782 .0547837 1.85 0.064 -.0058958 .2088523

c5 | .3999914 .1277946 3.13 0.002 .1495186 .6504642

_cons | 85.42324 111.8774 0.76 0.445 -133.8525 304.6989

---------------------------------------------------------------------------

---

If you impose constraints that the slopes are common across equations of the SUR, you're going to be very close to a xtreg,fe model.

Kit

--On Tuesday, October 22, 2002 11:10 -0400 Nick Winter <nwinter@policystudies.com> wrote:

Kit, I'm confused by your mentioning of -sureg- in relation to panel models. How does sureg estimate what you describe? I thought of -sureg- as estimating different models on the same cases; not the same models on different sets of cases? But maybe I'm just missing something obvious? Thanks Nick ----------------------------------------------------------- Nicholas Winter, Ph.D. P 202.939.5343 Policy Studies Associates F 202.939.5732 1718 Connecticut Avenue, NW nwinter@policystudies.com Washington, DC 20009-1148 www.policystudies.com ----------------------------------------------------------------Original Message----- From: Kit Baum, Faculty Micro Resource Center [mailto:fmrc@bc.edu] Sent: Tuesday, October 22, 2002 10:57 AM To: statalist@hsphsun2.harvard.edu Subject: st: Re: fixed effects and SUR --On Tuesday, October 22, 2002 2:33 -0400 Jeremy wrote: > > Hi Everybody, > > Could anybody give me some idea how to estimate SUR with fixed effects > using Stata? I'm new to Stata. All I know at this point is that I could > use XTREG to estimate a single equation with fixed effects, and SUREG to > estimate a system of equations. I've no idea how to proceed from here. > For your information, I'm trying to use Stata to "cross-check" some > estimation results I obtained using TSP. Your answers will be gratefully > appreciated. > > Jeremy Z. > and cb23 responded > > Just in case no-one comes up with a correct answer on this, I would try > the following :- > > I think I am right in saying that the xtreg fixed effects model is just > a standard OLS model with dummies for the groups with one alteration: in > OLS we choose a baseline dummy for which we set the coefficient to zero > and in fixed effects we sum the dummy coefficients on all groups to > zero. This means that the coefficients on the other Xs should be the > same in fixed effects and the dummy variable approach, and the only > difference will be in the coefficients of the constant and the group > dummies/effects. You should try this to make sure it works. You can > even try to choose the baseline dummy such that the coefficients on the > other dummies are close to summing to zero. > > Than, having realised we can roughly write a fixed effect model as a > standard equation, you could then rewrite your fixed effect equations in > a dummy variable form and stick them in to a SUR model. I find this quite confused. Note that if we start with the most general (infeasible) model of panel data, in which every i and t has its own coefficient vector, we can define special cases: a) all slopes constant over i and t, s^2 constant over i and t, intercept varies over i b) intercept, slopes, and s^2 all have an i subscript, but are constant over t The former case is one-way (individual) fixed effects, aka LSDV (dummy var) model, which may be estimated by xtreg, fe or areg. Note that normalisation of the intercepts makes no difference here; no matter whether you include a constant and (n-1) dummies, or express data as demeaned by individual, you will get the same estimates in terms of significance. The latter case is Zellner SUR, estimable via sureg. This is a 'fixed effect' model, in that each individual has his/her own equation (thus N < T for standard SUR), with his/her own intercept, set of slopes, and s^2. One can consider special cases of SUR in which further constraints are imposed (e.g. common slopes over units) which, since SUR is a GLS estimator, takes you back very close to individual fixed effects (except that SUR allows for s^2_i, whereas IFE imposes a single s^2 on the entire panel). So I don't know what it means to estimate SUR with fixed effects; if you're using SUR, you are already estimating individual fixed effects, and more. Kit -------------------------------------------------------------------- Kit Baum, Faculty Micro Resource Center fmrc@bc.edu Academic Technology Services, Boston College http://www.bc.edu/ats http://fmwww.bc.edu/FMRC/ http://fmwww.bc.edu/GStat/ * * 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/

* * 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/

**Follow-Ups**:**st: RE: RE: Re: fixed effects and SUR***From:*"J. Yimin Zhou" <zymx@yahoo.com>

**st: different graphics windows***From:*"HealthMaps" <healthmaps@attbi.com>

- Prev by Date:
**st: Re: MC/bootstrap** - Next by Date:
**st: different graphics windows** - Previous by thread:
**st: Re: MC/bootstrap** - Next by thread:
**st: different graphics windows** - Index(es):

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