Hi,
I am running below code
proc means data = p_tra
qntldef=5
mean median min q3 q1 max stddev n ;
var Baseline "Follow-up 1"n "Follow-up 2"n "Follow-up 3"n;
output out=p_tra_out ;
run;
Output:
Variable | Mean | Median | Minimum | Upper Quartile | Lower Quartile | Maximum | Std Dev | N |
Baseline | 1.944444 | 1 | 1 | 4 | 1 | 5 | 1.589385 | 18 |
Follow-up 1 | 1.777778 | 1 | 1 | 1 | 1 | 5 | 1.516791 | 18 |
Follow-up 2 | 1.6 | 1 | 1 | 1 | 1 | 5 | 1.298351 | 15 |
Follow-up 3 | . | . | . | . | . | . | . | 0 |
It is giving me perfect output what I wanted whole displying the output of PROC Means.
But, When I want the same output in output work dataset, I am not getting that.
Tried of using mean= median=, but no use.
Without specifying any options, I am getting default vars N,Min,Max,Mean,STD. along with them I want Median, Q3, Q1 as well in output dataset.
Could someone tell me how to get output dataset with all variables like proc means output.
Thanks,
Pessi
Use the STACKODS option and ODS OUTPUT
ods output summary=outputdatasetname;
proc means data = sashelp.class stackods qntldef=5 mean median min q3 q1 max stddev n ;
var height weight;
run;
From now on, please enter code in a code box (as I have done above) by clicking on the "running man" icon and pasting your code into the window that appears.
Use the STACKODS option and ODS OUTPUT
ods output summary=outputdatasetname;
proc means data = sashelp.class stackods qntldef=5 mean median min q3 q1 max stddev n ;
var height weight;
run;
From now on, please enter code in a code box (as I have done above) by clicking on the "running man" icon and pasting your code into the window that appears.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.