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

Re: st: frustrated by missing variables--collapase and merge


From   Zhou YU <[email protected]>
To   [email protected]
Subject   Re: st: frustrated by missing variables--collapase and merge
Date   Mon, 18 Mar 2002 21:43:30 -0800

Ronnie,

Thanks for your note. I wish it could be that straightforward.

When I collapse x1 x2 x3 x4 by x5, I expect to have x1, x2, x3, x4 and x5 in my newly created dataset. However, the outcome dataset sometimes misses x1, x2, x3, x4 or x5. Sometimes, no variables were missing. Missing variables seems to be a random event. If there is a variable missing, I have to repeat the procedure which is very time consuming.

One possible reason might be my original dataset is quite large. I have to use virtual memory and set the memory to almost 1G. It seems that the problem is not significant when I collapse small dataset. I thought someone might have a silver bullet to solve the problem, by changing some settings.

Thanks a bunch.

Zhou




Zhou
I may be off the mark here but I dont see the problem.

Say you have x1 x2 x3 x4 as your variables. when u collapse x2 by x4
then you will be left with only x2 and x4 (and the structure of x2 will
change to reflect the collapse operation e.g mean).

About merging, Im not sure why any variables would disappear. Say you
had 2 data sets

dataset 1
x1 x2 x3

dataset 2
x1 x4 x5

if you merge these twodatasets (notice both have x1 so the merge would
be by x1) then the resulting dataset will have all the variables as well
as an additional one _merge

combined (merged)
x1 x2 x3 x4 x5 _merge


Ronnie


>>> [email protected] 03/18/05 4:24 am >>>
Hi all,

I have been trying to collapse merge a number of variables. What
frustrated me is that there is always one or two variables missing
after
collapsing or merging. Last night I have to repeated the same
procedures
several times, which took me the whole evening to create a dataset.
Intestingly, each time, different variables were missing.

Have anyone encountered the same problem? Any solutions?

Thanks a bunch!

Zhou

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