Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: How to merge individual records to groups in a largedataset, w/o using collapse


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: How to merge individual records to groups in a largedataset, w/o using collapse
Date   Mon, 26 Feb 2007 20:48:52 -0500

Can you just load the variables you need to use for the command? If so, then maybe the collapse will work. If not, you can loop across levels of region6 and use the summarize command to get the means, median, and sum you want and use ther postfile command to write these results to a new file. How many categories are there for region6 and how big are they? Could you load each level of region6 one at a time, using just the variables you need, and use the summarize and postfile approach? Do you have a list of the region6 values, or will you need to create it if you loop across it's values? More info could lead to actual suggested code...

Michael Blasnik

----- Original Message ----- From: "Allon Crazy" <[email protected]>
To: <[email protected]>
Sent: Monday, February 26, 2007 7:08 PM
Subject: Re: st: Re: How to merge individual records to groups in a large dataset, w/o using collapse



Hi Michael,

thanks for your advice. Seperate the dataset into
smaller ones might be better,but I did try, still too
big for my 1G ram, using "collapse".

An example I can give for what I want to accomplish is
:
collapse (mean) var1 var2 (median) var3 (sum) var4
[fw=weight5], by(region6)

I am wondering whether there is any alternative ways
to do the same task but require less ram.

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