hi stata users
does anybody know that problem:
I have a large dataset and therefore I have to split it into two sub datasets.
Then I have used both to calculate something in each of them.
When merged them in the first dataset, I have recognized that stata has not merged correctly
1.dataset
timevar identifier var1
1999 202 3
1999 204 3
1999 333 3
1999 543 3
2000 202 5
2000 300 6
2000 533 7
sub datasets
1.)
timevar identifier var1 var2_99
1999 202 3 2
1999 204 3 2
1999 333 3 2
1999 543 3 2
2.)
timevar identifier var1 var2_00
2000 202 5 4
2000 300 6 5
2000 533 7 6
How you can see, I have programmed var2_XX and I have made a simple calculation
Then, I have deleted var 1 and only timevar, identifier and var 2_XX remained.
Now I want to merge these results in the large dataset.
the bad result:
timevar identifier var1 var2_99 var2_00
1999 202 3 2 4
1999 204 3 2 5
1999 333 3 2 6
1999 543 3 2 .
2000 202 5 . .
2000 300 6 . .
2000 533 7 . .
The command has been :
sort identifier timevar
merge identifier timevar using "subdataset_99", nokeep
and respectively:
sort identifier timevar
merge identifier timevar using "subdataset_00", nokeep
stata did not recognized that timevar is 1999 and 2000 depending on the using dataset, I guess...
Any ideas???
Thanks !!!!
B
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
* 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/