help

Reply
N/A
Posts: 0

help

I have a table that has the same id number in mulitple observations. There are 3 variables of interest that I want summed (separately) by unique id number. I'm having trouble writing this code. Where may I find help on this topic? Thanks in advance.
N/A
Posts: 0

Re: help

you can sent part of them to me and I will sent the code to you
N/A
Posts: 0

Re: help

you can try olivier's code.I think it's a smart one.
Super Contributor
Posts: 260

Re: help

I think your program should look something like :

PROC MEANS DATA = yourDataSet NOPRINT NWAY ;
VAR yourInterestVariables ;
CLASS yourIDvariable ;
OUTPUT OUT = yourResultingDataSet
SUM = ;
RUN ;

You will create a new dataset, in which the sums of each of your interest variables will be included as a new variable (named after the interest variables), plus the ID variable.
Just copy and paste the previous program, leaving as it is the uppercase code, and replacing the rest by the correct names.

Regards.
Olivier
Ask a Question
Discussion stats
  • 3 replies
  • 387 views
  • 0 likes
  • 2 in conversation