How do I delete the rows and column that are in yellow bolow. I want table 1 to look like table 2 below.
proc means data=para noprint; class Variable; var estimate; output out=two mean(estimate)=col1
std(estimate)=col2 mean(StdErr)=col3;
run;
Table 1
Obs | Variable | _TYPE_ | _FREQ_ | col1 | col2 | col3 |
1 | 0 | 40 | 5.91033 | 3.42236 | 0.92869 | |
2 | Intercept | 1 | 20 | 2.61495 | 0.08503 | 0.13475 |
3 | TIMES | 1 | 20 | 9.20571 | 1.08266 | 1.72264 |
Table 2
Obs | Variable | _ FREQ_ | col1 | col2 | col3 | |
2 | Intercept | 20 | 2.61495 | 0.08503 | 0.13475 | |
3 | TIMES | 20 | 9.20571 | 1.08266 | 1.72264 |
You can prevent PROC MEANS from generating the _TYPE_=0 row by adding the NWAY option.
You could drop the _TYPE_ column by using dsoption on output data set.
proc means nway data=para noprint;
class Variable;
var estimate;
output out=two (drop=_type_)
mean(estimate)=col1
std(estimate)=col2
mean(StdErr)=col3
;
run;
You can prevent PROC MEANS from generating the _TYPE_=0 row by adding the NWAY option.
You could drop the _TYPE_ column by using dsoption on output data set.
proc means nway data=para noprint;
class Variable;
var estimate;
output out=two (drop=_type_)
mean(estimate)=col1
std(estimate)=col2
mean(StdErr)=col3
;
run;
Thanks a lot Tom
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.