Hello,
I have Proc Freq statement below.
proc freq data=test;
table Airway / out=Airway_Total_N nocol norow nocum;
where Age_group in (1,2,3,4) and C_Underly=1;
format Age_group Age_group.;
run;
proc freq data=test;
table Prematurity / out=Prematurity_Total_N nocol norow nocum;
where Age_group in (1,2,3,4) and C_Underly=1;
format Age_group Age_group.;
run;
I found out the percent results obtained from Airway(44.9%) and Prematurity(70.5%) subgroups. I I expect the percent sum should not be over 100% because I would like to use."Age_group in (1,2,3,4) and C_Underly=1
" as the denominator. Where did I do wrong? how to fix ti? Thanks.
If you run two PROC FREQs separately, SAS doesn't know that the maximum in your mind should be 100%. I think it should not be 100%. The reason it is over 100% is that subjects can be in both the AIRWAY and PREMATURITY groups.
Perhaps you want to run one PROC FREQ like this:
table Airway*Prematurity / out=Airway_Total_N nocol norow nocum;
then you will get results that add to 100%. Whether or not this particular analysis is what you want is a different question, you didn't say exactly what you do want.
I found out the percent results obtained from Airway(44.9%) and Prematurity(70.5%) subgroups
Why would you expect two different variables to add up to 100%?
If you run two PROC FREQs separately, SAS doesn't know that the maximum in your mind should be 100%. I think it should not be 100%. The reason it is over 100% is that subjects can be in both the AIRWAY and PREMATURITY groups.
Perhaps you want to run one PROC FREQ like this:
table Airway*Prematurity / out=Airway_Total_N nocol norow nocum;
then you will get results that add to 100%. Whether or not this particular analysis is what you want is a different question, you didn't say exactly what you do want.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.