Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: random sample from aggregated data


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: random sample from aggregated data
Date   Mon, 5 Dec 2005 09:28:55 -0600

There's been some discussion about sampling with probability
proportional to size (PPS) a few weeks ago on the list. You can try
adopting some of those routines: your f will be the measure of size
that can be used in PPS.

For most estimation routines you can think of, if those are all the
variables you want to use, you can get along with [fw], I believe.
Taking samples from aggregated data is an awkward idea, I'd say; and
it will lead you to the results that will be difficult to justify. And
if you have access to the whole population (lucky you), then you
should just take samples from that population directly with -sample-.

Other advice on how to make this quicker is to drop all other
variables in your dataset. That will help -bsample- quite a bit, as
far as I can recall its mechanics.

On 12/5/05, Blau Blau <[email protected]> wrote:
> dear all,
> I have aggregated data:
>
> year X sex  X age X education level X labor force participation (7x2x9x4x2)
>
> these data are from the whole population and I would like to make random sample from them, but they are to big to do that,
> do you have any idea how I can do that?
>
>
> what I did: I use STATA 9.1/SE and first of all I changed my memory to 950m
> after that I transformed  aggregated data to individual data by
>
> expand f
>
> it consumed a lot of time but it was ok
>
> after that I tried to do random sample to have at each table 1000 respondents
>
> bsample 1000, strata(year sex age)
>
> I left the computer to work on it during the weekend but it is not completed yet, so I think that it is not possible to do,
> do you have any idea how to do random sample if I have so big data?


--
Stas Kolenikov
http://stas.kolenikov.name

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