BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Odienliow
Calcite | Level 5

This is my coding. I am very new to SAS and currently doing school project.

data response;

input Subject $ Political_party $ Sex $ Age $

Donation Q1  Q2 Q3  Q4 @@ ;

datalines;

1  D M 47 400 4 3 6 2

2  R M 36 800 4 6 6 6

3  I F 52 200 1 3 7 2

4  R M 47 300 3 2 5 3

5  D F 42 300 4 4 5 6

6  R F 44 1200 2 2 5 5

7  D M 44 200 6 2 3 6

8  D M 50 400 4 3 6 2

09 D F 33 500  3 4 7 1

10 R M 49 700  7 2 6 7

11 D F 59 600  4 2 5 6

12 D M 38 300  4 1 2 6

13 I M 55 100  5 5 6 5

14 I F 52 200  5 2 6 5

15 D F 48 100  6 3 4 6

16 R F 47 1500 2 1 6 2

17 D M 49 500  4 1 6 2

18 D F 43 1000 5 2 7 3

19 D F 44 300  4 3 5 7

run;

proc means data=response maxdec=3;

var Donation;

class Political_party  ;

types () Political_party;

title 'Prediction of donation size based on political party';

run;


i plan on doing one more analysis which is the skewness of the political party, how to modify the coding?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You can list the statistics in the PROC MEANS statement. THe list of available statistics can be found her:

Base SAS(R) 9.2 Procedures Guide

proc means data=response maxdec=3 N MIN MAX MEDIAN MEAN SKEW;

var Donation;

class Political_party  ;

types () Political_party;

title 'Prediction of donation size based on political party';

run;

View solution in original post

1 REPLY 1
Reeza
Super User

You can list the statistics in the PROC MEANS statement. THe list of available statistics can be found her:

Base SAS(R) 9.2 Procedures Guide

proc means data=response maxdec=3 N MIN MAX MEDIAN MEAN SKEW;

var Donation;

class Political_party  ;

types () Political_party;

title 'Prediction of donation size based on political party';

run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1147 views
  • 0 likes
  • 2 in conversation