--- Renuka Metcalfe <[email protected]> wrote:
> I want to bring "meanworkplacex1 by firm and
> occupations" and meanworkplacex2 by firm and
> occupations" from a matched employee and employer data
> to the same employer only data (which only comprises
> of about 2200). When I use the collapse command to
> bring 2 variables the observations increase to about
> 4660. I do not think the observations should increase
> to beyound about 2000. I would be grateful, if anyone
> could let me know, how I could bring the observations
> to less than 2200.
This seems to be a problem with your data and you do not give us the
exact commands you used, so it is very hard for us to solve this
problem. There are two things I can do given the information you have
given us: 1) remark that the by option in -collapse- assumes that a
missing value is also a level, this might increase the number of cases
to more then you expect, and 2) give you an example that works with
data that is available to everyone (with Stata):
*------------ begin example --------------
sysuse auto, clear
count
collapse (mean) price mpg if rep78 < ., by(rep78)
count
*------------- end example ---------------
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
*
* 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/