A SAS dataset named subject is created. The SAS code for the creation of the dataset subject is as follows:
data subject;
input patid name$ sex$ visit $ parameter$ result $;
cards;
0101 lisha f Screening weight 65
0101 lisha f Screening height 150
0101 lisha f Visit1 weight 66
0101 lisha f Visit1 height 150
0102 manu m Screening weight 80
0102 manu m Screening height 165
0102 manu m Visit1 weight 80
0102 manu m Visit2 height 165
;
run;
The aim is to summarize the values across a single observation. The template is as follows:
data subject;
input patid name$ sex$ visit $ parameter$ result $;
cards;
0101 lisha f Screening weight 65
0101 lisha f Screening height 150
0101 lisha f Visit1 weight 66
0101 lisha f Visit1 height 150
0102 manu m Screening weight 80
0102 manu m Screening height 165
0102 manu m Visit1 weight 80
0102 manu m Visit2 height 165
;
run;
The aim is to summarize the values across a single observation. The template is as follows:
When using the following code, the output is generated but a Note is also generated in the log as mentioned below:
proc report data=subject nowindows;
column patid name sex visit parameter result;
define patid/"Patient Number" group;
define name/"Subject Number" group;
define sex/"Sex" group;
define visit/"Visit" group;
define parameter/"Test" display;
define result/"Values" display;
run;
The SAS log will look like as follows::
1
2
3 data subject;
4 input patid name$ sex$ visit $ parameter$ result $;
5 cards;
NOTE: The data set WORK.SUBJECT has 8 observations and 6 variables.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.00 seconds
14 ;
15 run;
16
17 proc report data=subject nowindows;
18 column patid name sex visit parameter result;
19 define patid/"Patient Number" group;
20 define name/"Subject Number" group;
21 define sex/"Sex" group;
22 define visit/"Visit" group;
23 define parameter/"Test" display;
24 define result/"Values" display;
25 run;
NOTE: Groups are not created because the usage of parameter is DISPLAY.
NOTE: There were 8 observations read from the data set WORK.SUBJECT.
NOTE: PROCEDURE REPORT used:
real time 0.01 seconds
cpu time 0.01 seconds
To remove this note from the log the following code should be used.
column patid name sex visit parameter result;
define patid/"Patient Number" order;
define name/"Subject Number" order;
define sex/"Sex" order;
define visit/"Visit" order;
define parameter/"Test" display;
define result/"Values" display;
run;
1
2
3 data subject;
4 input patid name$ sex$ visit $ parameter$ result $;
5 cards;
NOTE: The data set WORK.SUBJECT has 8 observations and 6 variables.
NOTE: DATA statement used:
real time 0.00 seconds
cpu time 0.00 seconds
14 ;
15 run;
16
17 proc report data=subject nowindows;
18 column patid name sex visit parameter result;
19 define patid/"Patient Number" order;
20 define name/"Subject Number" order;
21 define sex/"Sex" order;
22 define visit/"Visit" order;
23 define parameter/"Test" display;
24 define result/"Values" display;
25 run;
NOTE: There were 8 observations read from the data set WORK.SUBJECT.
NOTE: PROCEDURE REPORT used:
real time 0.00 seconds
cpu time 0.00 seconds
The SAS log is now free of the notes, errors and warnings. Instead of using the group variable, use order with display in the define statement.
No comments:
Post a Comment