127.INPUT STATEMENT | PROC MEANS | PROC REPORT IN SAS

 INPUT STATEMENT | PROC MEANS | PROC REPORT IN SAS


/*Use PROC MEANS and PROC UNIVARIATE to find mean, SD, min, and max for each PARAMCD.*/

/*Use PROC REPORT to create a formatted summary table*/


DATA VS;

 INPUT USUBJID PARAMCD$ AVAL VISIT$;

 CARDS;

101 SYSBP 120 BASELINE

101 SYSBP 130 WEEK1

102 SYSBP 125 BASELINE

102 SYSBP 128 WEEK1

;

RUN;

PROC PRINT;RUN;


OUTPUT:

Obs USUBJID PARAMCD AVAL VISIT
1 101 SYSBP 120 BASELINE
2 101 SYSBP 130 WEEK1
3 102 SYSBP 125 BASELINE
4 102 SYSBP 128 WEEK1


PROC MEANS DATA=VS MEAN STD MIN MAX;

 CLASS PARAMCD;

 VAR AVAL;

RUN;


OUTPUT:

                                 The MEANS Procedure

                                        Analysis Variable : AVAL
PARAMCD N Obs Mean Std Dev Minimum Maximum
SYSBP 4 125.7500000 4.3493295 120.0000000 130.0000000


PROC REPORT DATA=VS;

 COLUMN PARAMCD AVAL ;

 DEFINE PARAMCD / GROUP 'PARAMETER';

 DEFINE AVAL / ANALYSIS MEAN FORMAT=8.2 "MEAN VALUE";

RUN;


OUTPUT:
PARAMETER MEAN VALUE
SYSBP 125.75



PRACTICE AND COMMENT YOUR CODE: 

-->PLEASE FOLLOW OUR BLOG FOR MORE UPDATES.

TO FOLLOW OUR TELEGRAM CHANNEL CLICK HERE

Comments

Popular posts from this blog

409.Can We Build a Reliable Emergency Services Analytics & Fraud Detection System in SAS While Identifying and Fixing Intentional Errors?

397.If a satellite has excellent signal strength but very high latency, can it still deliver good quality communication? Why or why not?A Sas Study

401.How Efficient Are Global Data Centers? A Complete SAS Analytics Study