I have a dataset with the following variables: Year, Symbol (to identify which firm it is), and the two variables I want to count frequency and percentage: voluntary and mandatory, they are both dummy variables. I want to count the frequency and percentage of two variables by year and put them in one table. This is what I did, but that doesn't count percentage, and the two variables can't be tabled together.
Code:
tab Year, c(count mandatory_prop)
0 Response to How to get a table that count the frequency and percentage of two variables by year
Post a Comment