HI,
Could anyone help me out?
I have one categorical variable (1-4 with an increasing level of smoking prevalence) and year dummy (2009-2017).
I want to generate the new variable with the proportion of each category for each year.
To simply put, I want my summarized table shown above filled with percentage numbers.
I have tried according to the link below but did not work as I intended...
Thanks in advance!
Could anyone help me out?
I have one categorical variable (1-4 with an increasing level of smoking prevalence) and year dummy (2009-2017).
I want to generate the new variable with the proportion of each category for each year.
category 1 | category 2 | category 3 | category 4 | total % | |
2009 | 100 | ||||
2011 | 100 | ||||
2012 | 100 | ||||
2014 | 100 |
I have tried according to the link below but did not work as I intended...
Thanks in advance!
Comment