Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: STATA command equivalent to SPSS "aggregate"?

From   <>
To   <>
Subject   st: STATA command equivalent to SPSS "aggregate"?
Date   Wed, 20 Mar 2013 16:27:25 -0000

Date: Tue, 19 Mar 2013 23:09:09 +1030
From: "Judith Saebel" <>
Subject: st: STATA command equivalent to SPSS "aggregate"?

Dear All,

In STATA (version 11), is there an equivalent to the SPSS command
"aggregate" please?

Many thanks in advance for any advice.
Judith Saebel

In addition to the comments already made, I would suggest that the
answer to your question depends on what you want to do with the
'aggregated' data. -collapse- produces a new dataset, which you could
(a) analyse as is, or perhaps (b) you want to merge aggregated
statistics back onto your original data set. (E.g. a group mean
attributed to each member of the same group.) 

I write regarding (b). My recollection (from years back) is that one
could do this in SPSS only by using AGGREGATE following by merging the
data back in.

Stata allows you to do this in one step (and is one of the major reasons
I took up Stata): look at -egen- with or without -by:- (for subgroup

Stephen P. Jenkins <>

Please access the attached hyperlink for an important electronic communications disclaimer:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index