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;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.