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

st: re: iv and fixed effects

From   austin nichols <[email protected]>
To   [email protected]
Subject   st: re: iv and fixed effects
Date   Mon, 9 May 2005 12:03:05 -0400

In most survey data, you will have pweights, not fweights, so you will
want to center specifying aweights (means are equiv using pweights and
aweights, but variance estimates are not).

For an artificial, contrived, overly simple example, try:
. ssc install center
. ssc install ivreg2
. gen pwt=pop/1000
. foreach v of varlist death marr div pop18 pop65 {
     g r_`v'=`v'/pop
. qui tab regi, gen(rd)
. drop rd1
. bysort regi: center r_de r_pop18 r_pop65 r_di r_ma [aw=pwt], prefix(d)
. ivreg2 r_de r_pop18 r_pop65p (r_di =r_ma) rd* [pw=pwt], ffirst
. ivreg2 dr_de dr_pop18 dr_pop65p (dr_di =dr_ma) [pw=pwt], ffirst

On 5/9/05, Kit Baum <[email protected]> wrote:
<snip> To answer the first question, NO, these smell like classic
frequency weights to me. As for the second, you can do the weighting
in Jann's center command:
 webuse census2
 center medage [fw=pop]
In my understanding that will give you a demeaned, appropriately
weighted median age variable.

*   For searches and help try:

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