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]
st: RE: RE: how to -expand- and attach new group id to panel data
From
"sdm1" <[email protected]>
To
<[email protected]>
Subject
st: RE: RE: how to -expand- and attach new group id to panel data
Date
Fri, 1 Oct 2010 11:19:00 +0100
Thanks Nick.
I want to use -xtivreg, re- but to give more weight to some groups. As
there is no weight facility with -xtivreg, re- I thought of -expand-ing the
groups in lieu of weighting, and then running -xtivreg, re-. I appreciate
that the standard errors will be meaningless but it is the coefficients that
I am most interested in.
Steve
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: 30 September 2010 17:58
To: '[email protected]'
Subject: st: RE: how to -expand- and attach new group id to panel data
Two answers:
1. Why and how are you discriminating between clones of any panel?
2. -egen, seq()-.
Nick
[email protected]
Steve
I have a balanced panel data set with 3 annual observations for each of 3
groups e.g.,
Group_id year
1 78
1 79
1 80
2 78
2 79
2 80
3 78
3 79
3 80
Suppose I use -expand- to generate, say, one extra copy of the data for
group_id 2 and two extra copies of the data for group_id 3. Now I have:
Group_id year
1 78
1 79
1 80
2 78
2 79
2 80
3 78
3 79
3 80
2 78
2 79
2 80
3 78
3 79
3 80
3 78
3 79
3 80
How do I give new group_ids to the copied data so that now:
Group_id year Newgroup_id
1 78 1
1 79 1
1 80 1
2 78 2
2 79 2
2 80 2
3 78 3
3 79 3
3 80 3
2 78 4
2 79 4
2 80 4
3 78 5
3 79 5
3 80 5
3 78 6
3 79 6
3 80 6
*
* 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/
*
* 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/