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   Tue, 27 Feb 2007 19:41:52 -0500

By levels, I mean distinct values, as in what the -levelsof- command provides in Stata. I can't imagine what you think I meant -- if it had just one level then it would be a constant?

Anyway, a key issue for designing the best approach in terms of memory and speed requires knowing what a tabulation of region6 would look like..how many distinct groups does it define? How big is the largest group? etc..


----- Original Message ----- From: "Allon Crazy" <[email protected]>
To: <[email protected]>
Sent: Tuesday, February 27, 2007 7:23 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 patience.

My Region6 has only one level, which is why I did not
answer directly. I was not sure what do you mean by
the levels of Region6. Region6 has only one level, but
many values (such as all the fips codes of counties).

--- Michael Blasnik <[email protected]>
wrote:

I think you misunderstood me.  I didn't suggest
doing one variable at a
time, although that could be built into the loop too
and may be a viable
alternative overall.  What I suggested was to
analyze  one category  of
group6 at a time within a loop and only using only
the variables in the
dataset that you need summary stats for (assuming
rhere may be other
variables in that large dataset that aren't needed
for this task) .  The
entire process can be written into a do or ado file
to automatically create
the results dataset you want.  You didn't bother
answering my questions
about how many levels there are in region6 and
whether the variables you
need could fit in memory using the largest region6
category, so I won't
bother showing you the code to automate it :)

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