09-14-2015 05:46 PM
I just started to learn and use SAS… I’am currently facing a problem and hope someone would be able to help me.
I have a database of the following form :
What I would like is to create a table that will contains the number of observation per group. So something like :
I am trying to work with a loop that will complete progressively the table but after many trials i am unable to do so… Does someone has an idea ?
Thank you very much
09-14-2015 05:58 PM
Proc summary is nice to use for such situations. e.g.,
proc summary data=have nway;
output out=want (drop=_ sum=;
09-15-2015 02:21 AM - edited 09-15-2015 02:21 AM
An other way to do the same, is create the summary with SQL.
create table summary as(
select model, sum(option1) as option1, sum(option2) as option2, sum(option3) as option3
group by model /*This option make the sum by model*/