I am trying out the new table command, to create a three way cross tabulation (is there a difference between East and West Germany in the opinions on the role of women after one controls for religious affiliation). I got far, but there are still two problems where I am stuck.
Within each panel I am showing column percentages. I would like to emphasize this by adding column totals to each panel (they would be all 100%)
The variable labels for relig (religious affiliation) and husb_career (wife should support husband's career) are not necessary as the value labels contain all the relevant information and I would like to remove them from the table
Within each panel I am showing column percentages. I would like to emphasize this by adding column totals to each panel (they would be all 100%)
The variable labels for relig (religious affiliation) and husb_career (wife should support husband's career) are not necessary as the value labels contain all the relevant information and I would like to remove them from the table
Code:
. clear . input byte(eastwest husb_career relig) int freq eastwest husb_career relig freq 1. 1 0 0 2177 2. 1 0 1 10582 3. 2 0 0 2396 4. 2 0 1 892 5. 1 1 0 509 6. 1 1 1 5236 7. 2 1 0 590 8. 2 1 1 387 9. end . label values eastwest eastwest . label def eastwest 1 "West", modify . label def eastwest 2 "East", modify . label values husb_career husb_career . label def husb_career 0 "wife can prioritize own career", modify . label def husb_career 1 "wife should support husband's career", modify . label values relig relig . label def relig 0 "non-religious", modify . label def relig 1 "religious", modify . label var eastwest "Region of Germany" . label var husb_career "wife should support husband's career" . label var relig "religious affiliation" . . qui table (relig var) (eastwest) [fw=freq], /// > stat(fvpercent husb_career) nformat(%9.0f) sformat("%s%%") . . collect style row stack, nobinder spacer . . collect preview ------------------------------------------------------------------- | Region of Germany | West East Total -------------------------------------------+----------------------- religious affiliation | non-religious | wife should support husband's career | wife can prioritize own career | 81% 80% 81% wife should support husband's career | 19% 20% 19% | religious | wife should support husband's career | wife can prioritize own career | 67% 70% 67% wife should support husband's career | 33% 30% 33% | Total | wife should support husband's career | wife can prioritize own career | 69% 77% 70% wife should support husband's career | 31% 23% 30% -------------------------------------------------------------------
Comment