| Date: | Thu, 27 Jan 2005 17:34:26 -0800 |
| Reply-To: | seema.pai@GMAIL.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | seema.pai@GMAIL.COM |
| Organization: | http://groups.google.com |
| Subject: | Summing across records |
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
Hi,
I have a dataset where I have multiple observations per respondent
identified by the respondent id. I need to sum one of the variables in
my dataset across all the records for a particular respondent to create
a summary dataset.
For instance
id var1 var2 var3
1
1
1
1
2
2
3
3
3
3
3
I want to create a new dataset that has the following format
id varsum1
1
2
3
4
where varsum1 = sum of var1 for all observations for that particular
id.
Thanks a lot for all your help.
regards,
Seema
|