dear friends
i have dataset and i need to calculate the percentages ....
Pt Aebodsys aedecod
1 Soc1 pt1
1 soc1 pt1
1 soc2 pt1
2 soc1 pt1
2 soc1 pt2
I have a dataset like this and I want to create percentage like this..
Denominator is aebodsys count-group
Nominator is aedecod count-subgroup
Aebodsys aedecod n percent
Soc1 2 2/2=100
Pt1 2 2/2=100
Pt2 1 ½=50
Soc2 1 1/1=100
Pt1 1 1/1=100
thank you
PROC FREQ?
What does this line represent?
Soc1 2 2/2=100
Your example data has 4 records with Soc1, so how does it get an n of 2? and what is the denominator? I think you might want to provide a few more example records as 2 is showing in so many places we can't tell where the 2 is coming from.
hear N is count of the subjcts (pt) ...i done the answer by using retain statement ...thank you ballardw and linusH for quick respose
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →
Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.