Hi all! Is there an easy way to automate a table like the following for a large data set? Essentially I'm reporting my data in the following way with number and percentage in each group and the odds ratio with the confidence interval:
| | Total n (%) | Survived n (%) | Died n (%) | OR (CI) |
| Female | x (x%) | x (x%) | x (x%) | x.xx (x.xx-x.xx) |
| Heart disease | x (x%) | x (x%) | x (x%) | x.xx (x.xx-x.xx) |
I've been doing my analysis using fit x by y, adding in the odds ratio, and looking at the contingency table and odds ratio then manually typing it into word. I know I should be able to use the tabulate function to streamline the process via excel to get the middle three columns but am interested to know if someone has a good way to list the OR in a table. Even if it's something like this it would be helpful, especially if you can make it into a script to run for all the variables I want stats on:
| | OR | lower 95% | Upper 95% |
| Female | x.xx | x.xx | x.xx |
| Heart disease | x.xx | x.xx | x.xx |
Any tips or tricks? I'm not great at using the JSL code but am working on learning!