Thank you guys for the help!
Mark: This is a survey data. every observation represents a certain number of
persons in the population. all the weights in the dataset addup to the whole
population. So the pweight is the weight I will use, isn't it?
Kit: Do I need to consider the weights while I am doing the demeaning? ie. when
I calculate the mean of a variable, should I use the sum of variables divided by
the number of oberservations, or should I use the sum of the products of the
variable and weight, then divide the sum by the total weights? I hope I've made
myself clear.
-----------------------------------------------------
Jianhui Li <[email protected]>
Quoting mail from "Mark Schaffer" <[email protected]> at Mon, 09 May 2005 12:26:14 +0100
Subject: Re: st: Re: IV and fixed effects
> Just to follow up on Kit's email,
>
> From: Kit Baum <[email protected]>
> Subject: st: Re: IV and fixed effects
> Date sent: Mon, 9 May 2005 07:11:47 -0400
> To: [email protected]
> Send reply to: [email protected]
>
> > Presumably you have too many fixed effects to implement directly. But
> > you can always apply the demeaning transformation "by hand" to each
> > variable--that is, by unit, express each variable as a deviation for
> > the unit's mean--and then apply any appropriate estimator to the
> > transformed variables. That is all that the xtivreg,fe estimator (or
> > any estimator of the LSDV model, such as xtreg, fe or areg) is doing
> > anyway. The egen mean function (which supports the bys unit: prefix)
> > may be useful in doing this demeaning transformation.
>
> Ben Jann's -center- will do this very nicely, with a casewise option
> and support for aweights. Dealing with weights might be a bit
> tricky, though - is it simply a case of demeaning using weighted
> means? If so, aweights is good enough.
>
> --Mark
>
> >
> > Kit Baum, Boston College Economics
> > http://ideas.repec.org/e/pba1.html
> >
> > On May 9, 2005, at 2:33 AM, Juanhui wrote:
> >
> > > My survey data requires me to run fixed effect OLS regression with
> > > instrumental
> > > variables. However, xtivreg doesn't support weights. ivreg doesn't
> > > support fixed
> > > effects and areg doesn't support iv. Is there any way to combine them
> > > together
> > > and get me finish my thesis?
> >
> > *
> > * 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/
>
> Prof. Mark E. Schaffer
> Director
> Centre for Economic Reform and Transformation
> Department of Economics
> School of Management & Languages
> Heriot-Watt University, Edinburgh EH14 4AS UK
> 44-131-451-3494 direct
> 44-131-451-3296 fax
> 44-131-451-3485 CERT administrator
> http://www.sml.hw.ac.uk/cert
>
> *
> * 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/