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: XTSet: Imputed longitudinal panel data
From
"Castle, Melissa H" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: XTSet: Imputed longitudinal panel data
Date
Sun, 9 Jan 2011 15:57:10 -0500
Hi Stata-listers,
I¹m having a tough time setting my imputed dataset as time-series panel
data, and would greatly appreciate your help. Some background information:
I¹m working on a dataset that contains time-series panel data. I recently
imputed this data in wide form using the MIM command in STATA 10 to create
10 imputed datasets. I then used the reshape- command to convert it back
into long-form. I need to STATA to recognize that my data is longitudinal
panel data. The command I usually use for this is:
xtset c_id timevar
This usually works perfectly... But seems to be a little trickier when using
an imputed dataset. When I use the above command, I get an error ³repeated
time values within panel². I suspect this is because my panel-time variable
repeats for each iteration of imputations:
C_id _mj timevar
1 1 1
1 2 1
1 3 1
1 1 2
1 2 2
1 3 2
1 1 3
1 2 3
1 3 3
(Sample dataset: _mj = imputed dataset identifier).
So, I have a few questions:
* It seems that using XTSet isn¹t supported by MIM in Stata 10. Is there
another way?
* The interwebs seem to suggest that this might be possible with the mi
command in Stata11, but I have yet to see a command implementing a panel and
time-series identifier. Is this possible in Stata11?
* I tried to perform the command on each imputed database with an if
statement (xtset c_id timevar if _mj=1), but it says ³if not allowed². Is
there another way to apply a filter to the data? Is this even a reasonable
work-around?
I (and my thesis defense) would be wonderfully grateful for any help.
Thanks!
Melissa H. Castle
Doctoral Student
Clinical/Developmental Psychology
University of Pittsburgh
*
* 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/