This is my SAS code, basically I did some analysis and generated a final table.
proc format;
value grouplabel 1="Overall" 2="Scrolling vs. Non-Scrolling" 3="BYOD vs Non-Scrolling" 4="Intelligent vs Non-intelligent";
run;
data have;
length score $ 50.;
input score grouplabel1 estcirel ProbF;
cards;
score1 1 0.79 .
score1 2 0.80 0.45
score1 3 0.75 0.98
score1 4 0.78 0.45
score2 1 0.79 .
score2 2 0.80 0.45
score2 3 0.75 0.98
score2 4 0.78 0.45
;
run;
data have;
set have;
format grouplabel1 grouplabel.;
run;
proc report data=have;
column score grouplabel1,(estcirel ProbF);
define score/group "Score";
define grouplabel1/across " " order=INTERNAL;
run;
This is the output
If you look at the table above, the overall has 2 colmns. I want it to only show the estcriel colmn and the the probf column is all missing (no p-value as there is no comparisons). So it is not useful to have that column in my final table. I am fairly new to proc report, how do I structure the dataset and set up my proc report for the overall group to just show the estcriel while the other groupings to show both columns (so other grouping is correct)?
Want:
Try filtering those out with a WHERE clause?
proc report data=have;
where not (score='score1' and missing(probF));
column score grouplabel1,(estcirel ProbF);
define score/group "Score";
define grouplabel1/across " " order=INTERNAL;
run;
@Tpham wrote:
This is my SAS code, basically I did some analysis and generated a final table.
proc format; value grouplabel 1="Overall" 2="Scrolling vs. Non-Scrolling" 3="BYOD vs Non-Scrolling" 4="Intelligent vs Non-intelligent"; run; data have; length score $ 50.; input score grouplabel1 estcirel ProbF; cards; score1 1 0.79 . score1 2 0.80 0.45 score1 3 0.75 0.98 score1 4 0.78 0.45 score2 1 0.79 . score2 2 0.80 0.45 score2 3 0.75 0.98 score2 4 0.78 0.45 ; run; data have; set have; format grouplabel1 grouplabel.; run; proc report data=have; column score grouplabel1,(estcirel ProbF); define score/group "Score"; define grouplabel1/across " " order=INTERNAL; run;
This is the output
If you look at the table above, the overall has 2 colmns. I want it to only show the estcriel colmn and the the probf column is all missing (no p-value as there is no comparisons). So it is not useful to have that column in my final table. I am fairly new to proc report, how do I structure the dataset and set up my proc report for the overall group to just show the estcriel while the other groupings to show both columns (so other grouping is correct)?
Want:
Try filtering those out with a WHERE clause?
proc report data=have;
where not (score='score1' and missing(probF));
column score grouplabel1,(estcirel ProbF);
define score/group "Score";
define grouplabel1/across " " order=INTERNAL;
run;
@Tpham wrote:
This is my SAS code, basically I did some analysis and generated a final table.
proc format; value grouplabel 1="Overall" 2="Scrolling vs. Non-Scrolling" 3="BYOD vs Non-Scrolling" 4="Intelligent vs Non-intelligent"; run; data have; length score $ 50.; input score grouplabel1 estcirel ProbF; cards; score1 1 0.79 . score1 2 0.80 0.45 score1 3 0.75 0.98 score1 4 0.78 0.45 score2 1 0.79 . score2 2 0.80 0.45 score2 3 0.75 0.98 score2 4 0.78 0.45 ; run; data have; set have; format grouplabel1 grouplabel.; run; proc report data=have; column score grouplabel1,(estcirel ProbF); define score/group "Score"; define grouplabel1/across " " order=INTERNAL; run;
This is the output
If you look at the table above, the overall has 2 colmns. I want it to only show the estcriel colmn and the the probf column is all missing (no p-value as there is no comparisons). So it is not useful to have that column in my final table. I am fairly new to proc report, how do I structure the dataset and set up my proc report for the overall group to just show the estcriel while the other groupings to show both columns (so other grouping is correct)?
Want:
Or perhaps a format to use with ProbF that will show text like "No comparison" for missing values?
I have to say that seeing something that you state means no comparisons when there are 3 other comparisons involving the same variable looks very odd. If there is something else going on for those missing values perhaps a description is appropriate, or a symbol such as * and a footnote referencing that to explain why missing.
NOZERO option.
proc report data=have nowd;
column score grouplabel1,(estcirel ProbF);
define score/group "Score";
define grouplabel1/across " " order=INTERNAL nozero;
run;
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 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.
Ready to level-up your skills? Choose your own adventure.