s-news
[Top] [All Lists]

STATA "collapse" function

To: <s-news@lists.biostat.wustl.edu>
Subject: STATA "collapse" function
From: "Roberts, J. Kyle" <jkrobert@bcm.tmc.edu>
Date: Wed, 25 Oct 2006 10:46:56 -0500
In-reply-to: <81dc1548.ad25523a.81a0a00@po-d.temple.edu>
Thread-index: AcZmUflmpYRb0tGkRd++oL7og/GgVSR+jLVw
Thread-topic: STATA "collapse" function
 
Dear All,

I am looking for a function in S-PLUS that works like "collapse" in STATA.  
Specifically, I am trying to create some level-2 and level-3 datasets for use 
in HLM from a single dataset that I analyzed as a 3-level model in S-PLUS.  I 
tried collapse.groupedData, but I'm not getting exactly what I want.
In STATA, the function might look like:

collapse (mean)  meanses size sector pracad disclim himinty, by(id)

Thanks,
Kyle

***************************************
J. Kyle Roberts, Ph.D.
Baylor College of Medicine
Center for Educational Outreach
One Baylor Plaza, MS:  BCM411
Houston, TX   77030-3411
713-798-6672 - 713-798-8201 Fax
jkrobert@bcm.edu
***************************************

<Prev in Thread] Current Thread [Next in Thread>