Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: xtreg fe - using specific types of w/i group variation (HELP PLEASE)
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: xtreg fe - using specific types of w/i group variation (HELP PLEASE)
Date
Thu, 28 Oct 2010 10:44:21 -0400
Don Ruby <[email protected]>
Sounds like you want to make a new identifier for family and t:
egen newid=group(id1 time)
xtreg y x*, i(newid) r fe
On Tue, Oct 26, 2010 at 9:18 AM, Don Ruby <[email protected]> wrote:
> My data set is structured so that a unique observation is an (id1,
> id2, year) triple. Here id1 is a family id, id2 is a child id. I am
> interested in running FE models clustering at the family-level. I
> would like to run two models, using specific types of within-family
> variation:
>
> (1) Y_it - Y_jt = B(X_it - X_jt) + e_it + e_jt
>
> I want the identification of B to come from within-family differences
> in X using only children who are observed at the same time t. As I
> understand it, if I run the xtreg fe command as is, the identification
> will come from within-family differences across time.
>
> (2) Y_ia - Y_ja = B(X_ia - X_ja) + e_a + e_ja
>
> Here, I want to identify B to come from within-family differences in X
> using children who are the same age, but not necessarily at the same
> time t (unless they are twins).
>
> Is it possible to take advantage of these specific types of
> within-family variation by using "if" function in xtreg? Or is it
> necessary to build a new data set?
>
> Your help is greatly appreciated,
>
> Don Ruby
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/