Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Random subset from existing panel dataset


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Random subset from existing panel dataset
Date   Fri, 3 Jul 2009 17:33:37 +0100

"I have already tried to follow the advices from the FAQ "How can I take
random samples from an existing dataset?", but it does not work for me."

What did you try? In what sense did it not work? 

Do you want to sample entire panels? 

Nick 
n.j.cox@durham.ac.uk 

frauke.ruether@unisg.ch

I would like to do something that is pretty straight forward, but I do
not 
have the stata skills to do this and would appreciate some help.

I have an unbalanced panel data set (almost 101.000 observations) which
is 
too large to work with. The dataset looks like:

Id      year     y(dependent variable)  x1      x2      x3 (many many 
covariats)
1       2000
1       2001
1       2002

2       2003
2       2004

3       1998
3       1999
3       2000
3       2001
3       2002
3       2003
3       2004
3       2005

The dataset is already xtset with identifier (ID) and time (year).
Because 
the original dataset is too large I would like to take a random
subsample 
(containing of ca. 1000 observation) out of the original dataset. I have

already tried to follow the advices from the FAQ "How can I take random 
samples from an existing dataset?", but it does not work for me.


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



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