Statalist The Stata Listserver


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

Re: st: fixed effects with almost time invariant dummies


From   "Rodrigo A. Alfaro" <[email protected]>
To   <[email protected]>
Subject   Re: st: fixed effects with almost time invariant dummies
Date   Tue, 29 May 2007 14:19:49 -0400

Many thanks, for your suggestions.
I try to implement both.
Just two stupid wuestions about xttaylor.
1. How do you postestimate if your instruments are uncorrelated with
the unobserved time constant effect?
Hausman test, you could read the original paper Hausman Taylor (1981)
Econometrica 49, 1377-1398 (not difficult to read) and Baltagi, Khanti-
Akom (1990), Journal of Applied Econometrics, vol 5, no 4, 401-406
for the example that I gave you that includes how to compute HT,
AM and BMS.

2. What happens if there are some variables of interest possibly
correlated with the time variant error? Can you match both.? How can I
test the latter correlation?
You cannot use variables correlated with e(i,t)... you need additional
instruments for that and rethink HT estimator. Under correlation with
e(i,t) FE is not consistent, then HT is not valid.

3. Is there anyway to allow the cluster option?
Check the help for HT in Stata, in my code I use reg, then you
could use robust as well, but I am not sure what are you having
since it is RE model.

4. How should I adapt the sintax that you send me in the case that the
variables are almost time invariant, but not time invariant?
Pluemper and Troeger (2007) Political Analysis propose a definition
for "almost time invariant" (ATI), you cannot be sure of what you say
without a definition of ATI. They are the authors of -xtfevd- and their
paper show results using that proposal. In my opinion, you could
try taking the extreme: (1) treat the variables as time variant TV and
going ahead with HT, (2) treat the variables as TI and replace them
by the average over the period and again use HT.


thank you very much
alessia

2007/5/28, Rodrigo A. Alfaro <[email protected]>:
Allessia,

I don't like the way that you want to force the identification in the model.
Ingo's solution is a feasible way to deal with your problem as long as you
are able to find exogenous variables inside your model. Hausman-Taylor
estimator (HT) relies in very few assumptions, however, it is possible that
you don't have exogenous variables inside your model for that case you could
add extra-instruments to the second and third step. You will find at the end
of this message an example on how to compute HT "by hand" use it to create
your extended HT.

Taking your subject I analyzed the problem under FE with time variant
variables that have small within variation. It seems that FE is still
consistent under correlation between unobserved component and x variable,
where RE is not consistent. In some simulations FE is in general unbiased
but RE is not (mean bias)... probably the result on MSE is in the other way
around. Anyway, I suggest you to use RE only if you are sure that the
unobserved component is not correlated with your x's.

Finally, Thomas Pluemper analyzed a similar problem and he wrote a code for
Stata, see http://www.polsci.org/pluemper/xtfevd.htm

Rodrigo.


/***************** Example *******************************/
/// Setting
set more 1
set mem 10m
qui {
webuse psidextract, clear
local tv "lwage wks south smsa ms exp exp2 occ ind union"
local ti "fem blk ed"
keep `tv' `ti' id t
sort id t
tsset id t
foreach i of varlist `tv' {
by id: egen double `i'_m=mean(`i')
gen double `i'_dm = `i'-`i'_m
}

/// First step
reg lwage_dm wks_dm south_dm smsa_dm ms_dm exp_dm exp2_dm ///
occ_dm ind_dm union_dm, noc
sca sig_e2=e(rss)/3570
mat beta=e(b)
mat colnames beta = wks_m south_m smsa_m ms_m exp_m exp2_m ///
occ_m ind_m union_m
mat score double xbm_w = beta
gen double di = lwage_m - xbm_w
mat colnames beta = wks south smsa ms exp exp2 occ ind union
mat score double xb_w = beta

/// Second step
reg di fem blk ed (wks south smsa ms fem blk)
predict double zg, xb
reg di fem blk ed (wks_m south_m smsa_m ms_m fem blk) if t==7
predict double zg2, xb

/// Error and theta
g double fit1=lwage - xb_w - zg2
by id: gen double fit2=sum(fit1)
by id: replace fit2=(fit2[_N]/7)^2
sum fit2, meanonly
sca s2=r(sum)/595
sca sig_u2=(s2-sig_e2)/7
gen double theta=1-sqrt(sig_e2/(sig_e2+7*sig_u2))

/// GLS
foreach i of varlist `tv' {
gen `i'_g=`i'-theta*`i'_m
}
foreach i of varlist `ti' {
gen `i'_g=(1-theta)*`i'
}

/// More Instruments (for AM)
foreach i of varlist wks south smsa ms exp exp2 occ ind union {
forvalues k=1/7 {
gen aux=0
replace aux=`i' if t==`k'
by id: egen `i'_t`k'=sum(aux)
drop aux
}
}
}

/// Third step
reg lwage_g wks_g south_g smsa_g ms_g exp_g exp2_g ///
occ_g ind_g union_g fem_g blk_g ed_g ///
(*_dm south_m smsa_m occ_m ind_m fem blk), nohead
xthtaylor lwage wks south smsa ms exp exp2 occ ind ///
union fem blk ed, endog(wks ms exp exp2 union ed)
reg lwage_g wks_g south_g smsa_g ms_g exp_g exp2_g ///
occ_g ind_g union_g fem_g blk_g ed_g ///
(*_dm south_t* smsa_t* occ_t* ind_t* fem blk), nohead
xthtaylor lwage wks south smsa ms exp exp2 occ ind ///
union fem blk ed, endog(wks ms exp exp2 union ed) am

/***************** End Example ****************************/


----- Original Message -----
From: "Ingo Brooks" <[email protected]>
To: <[email protected]>
Sent: Monday, May 28, 2007 2:12 PM
Subject: Re: st: fixed effects with almost time invariant dummies


> Allessia,
>
> Why don't you rely on the Hausman-Taylor approach when estimating your
> model? In Stata type -help xthtaylor-.
>
> Best,
> Ingo
>
>
>
> On 5/28/07, alessia matano <[email protected]> wrote:
>> Hi to all,
>>
>> I have a real difficult question for all of you. A question that many
>> econometrics did not know how to answer me.
>> My question concerns fized effects and random effects estimates.
>> I have a panel of workers and i regress the wages against a series of
>> variables, included dummy of sector and regions of their workplace.
>> These variables appear fundamental to the estimation (i.e. if I take
>> them off a lot of other variables estimtes get not significant).
>> So then I do fixed effects estimations, and of course the dummy are
>> only identified when someone changes region or sector, so they are
>> identified for a subgroup of workers.
>> That means that also the other estimates get involved in these
>> problem: i.e are they affected by the fact that these variabvles are
>> identified only for a subgroup of workers??
>> What should I do then? Here my propose:
>> 1. Create a dummy interacting time with dummy
>> 2. Trying to estimate the same equation only for the subgroup of
>> workers which changes region or sector
>> 3. Trying to estimate it for the other workers, those which do not
>> chnage region or sector.
>>
>> How could I then compare these estimates with the random??
>>
>> Thanks, many thanks for your attention
>> alessia
>> *
>> * 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/

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