Given what you've posted, consider PROC FREQ.
It calculates the percentages automatically. So what you need to figure out is how to filter your data set but the percentage part is trivial. If you cannot provide real data that's understandable, instead generalize your problem and consider using datasets from SASHELP library, which are available to all SAS users instead.
proc freq data=sashelp.cars;
table origin;
run;
@chiyoung wrote:
Hi all,
I'd like to ask u guys some questions related to SAS statistical method. (SQL, any code,,)
What I want to see is the percentage of food sales on a daily basis based on the data attached.
Please refer to information below to understand the attached file. I want to compare these three groups.
[Excel Sheet1]
1) Number of foods sold for same period with the intervention date of last year (Nov,19th 2018 ~ Dec, 14th 2018 / 4 weeks exclude Sat & Sun) - No intervention
2) Number of food sales before the intervention (Oct, 25th 2019 ~ Nov, 15th 2019 / 4 weeks exclude Sat & Sun) - No intervention
3) Number of food sales during the intervention (Nov,18th 2019 ~ Dec, 13th 2019 / 4 weeks exclude Sat & Sun) - Intervention
[Background] I classified all foods in school cafeteria as nutrition score and put Alphabet score stickers on them during the intervention time. (A,B,C,D,E - A has the best nutrition composition). And I want to know how these nutri-score stickers affect people's consumption habit. I want to do interrupted time series analysis ultimately, but I want to see the ratio of each group before that.
It will be much appreciated if u guys let me know how to solve this problem. This is for my thesis.
Please feel free to comment on me if u have questions.
1,2) Caculation system Nutri-Score
3) my key thesis' graph in harvard Univ.
(https://search.proquest.com/docview/1820592544?rfr_id=info%3Axri%2Fsid%3Aprimo)
... View more