Examples of tabout tables
This page contains some of the example tables from the User Guide. The code for these tables can be found on the Examples code page of this website, from links inside User Guide.
Some LaTeX examples can be seen in this PDF document and the examples below are from the html output.
There is also a mock dynamic html page example here. For details, see Table 41 in the User Guide.
Table 1: A Simple Example
| Sex | ||||||
| Male | Female | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 584 | 58.2 | 651 | 57.8 | 1,235 | 58.0 |
| Lives in the South | 420 | 41.8 | 475 | 42.2 | 895 | 42.0 |
| Total | 1,004 | 100.0 | 1,126 | 100.0 | 2,130 | 100.0 |
| Race | ||||||
| White | 737 | 73.4 | 810 | 71.9 | 1,547 | 72.6 |
| Black | 259 | 25.8 | 300 | 26.6 | 559 | 26.2 |
| Other | 8 | 0.8 | 16 | 1.4 | 24 | 1.1 |
| Total | 1,004 | 100.0 | 1,126 | 100.0 | 2,130 | 100.0 |
| Member of a union | ||||||
| Not a union member | 635 | 74.3 | 706 | 76.1 | 1,341 | 75.2 |
| Union member | 220 | 25.7 | 222 | 23.9 | 442 | 24.8 |
| Total | 855 | 100.0 | 928 | 100.0 | 1,783 | 100.0 |
Source: nlsw88.dta
Table 2: Some refinements, including the sample size
| Sex | |||||||
| Male | Female | Total | Sample size | ||||
| % | % | % | % | % | % | ||
| Location | |||||||
| Does not live in the South | 58.2 | 47.3 | 57.8 | 52.7 | 58.0 | 100.0 | 1,235 |
| Lives in the South | 41.8 | 46.9 | 42.2 | 53.1 | 42.0 | 100.0 | 895 |
| Total | 100.0 | 47.1 | 100.0 | 52.9 | 100.0 | 100.0 | 2,130 |
| Sample size | 1,004 | 1,126 | 2,130 | ||||
| Race | |||||||
| White | 73.4 | 47.6 | 71.9 | 52.4 | 72.6 | 100.0 | 1,547 |
| Black | 25.8 | 46.3 | 26.6 | 53.7 | 26.2 | 100.0 | 559 |
| Other | 0.8 | 33.3 | 1.4 | 66.7 | 1.1 | 100.0 | 24 |
| Total | 100.0 | 47.1 | 100.0 | 52.9 | 100.0 | 100.0 | 2,130 |
| Sample size | 1,004 | 1,126 | 2,130 | ||||
| Member of a union | |||||||
| Not a union member | 74.3 | 47.4 | 76.1 | 52.6 | 75.2 | 100.0 | 1,341 |
| Union member | 25.7 | 49.8 | 23.9 | 50.2 | 24.8 | 100.0 | 442 |
| Total | 100.0 | 48.0 | 100.0 | 52.0 | 100.0 | 100.0 | 1,783 |
| Sample size | 855 | 928 | 1,783 | ||||
Source: nlsw88.dta
Table 3: Further refinements, using column block layout
| Sex | |||||||
| Male | Female | Total | Male | Female | Total | Sample size | |
| Location | |||||||
| Does not live in the South | 58.2 | 57.8 | 58.0 | 47.3 | 52.7 | 100.0 | 1,235 |
| Lives in the South | 41.8 | 42.2 | 42.0 | 46.9 | 53.1 | 100.0 | 895 |
| Total | 100.0 | 100.0 | 100.0 | 47.1 | 52.9 | 100.0 | 2,130 |
| Sample size | 1,004 | 1,126 | 2,130 | ||||
| Race | |||||||
| White | 73.4 | 71.9 | 72.6 | 47.6 | 52.4 | 100.0 | 1,547 |
| Black | 25.8 | 26.6 | 26.2 | 46.3 | 53.7 | 100.0 | 559 |
| Other | 0.8 | 1.4 | 1.1 | 33.3 | 66.7 | 100.0 | 24 |
| Total | 100.0 | 100.0 | 100.0 | 47.1 | 52.9 | 100.0 | 2,130 |
| Sample size | 1,004 | 1,126 | 2,130 | ||||
| Member of a union | |||||||
| Not a union member | 74.3 | 76.1 | 75.2 | 47.4 | 52.6 | 100.0 | 1,341 |
| Union member | 25.7 | 23.9 | 24.8 | 49.8 | 50.2 | 100.0 | 442 |
| Total | 100.0 | 100.0 | 100.0 | 48.0 | 52.0 | 100.0 | 1,783 |
| Sample size | 855 | 928 | 1,783 | ||||
Source: nlsw88.dta
Table 4: Example of a simple cross tabulation
| Patient died | |||||||||
| No | Yes | Total | |||||||
| No. | Col % | Cum % | No. | Col % | Cum % | No. | Col % | Cum % | |
| 10 or less months | 4 | 23.5 | 23.5 | 15 | 48.4 | 48.4 | 19 | 39.6 | 39.6 |
| 11 to 20 months | 6 | 35.3 | 58.8 | 8 | 25.8 | 74.2 | 14 | 29.2 | 68.8 |
| 21 to 30 months | 2 | 11.8 | 70.6 | 7 | 22.6 | 96.8 | 9 | 18.8 | 87.5 |
| 31 or more months | 5 | 29.4 | 100.0 | 1 | 3.2 | 100.0 | 6 | 12.5 | 100.0 |
| Total | 17 | 100.0 | 31 | 100.0 | 48 | 100.0 | |||
Source: cancer.dta
Table 5: Example of cross tabulation using panels
| Education | |||
| Not college graduate | College graduate | Total | |
| Location | |||
| Does not live in the South | 4,941 | 1,516 | 6,458 |
| Lives in the South | 3,661 | 1,095 | 4,756 |
| Total | 8,602 | 2,611 | 11,213 |
| % | % | % | |
| Does not live in the South | 76.5 | 23.5 | 100.0 |
| Lives in the South | 77.0 | 23.0 | 100.0 |
| Total | 76.7 | 23.3 | 100.0 |
| % | % | % | |
| Does not live in the South | 57.4 | 58.1 | 57.6 |
| Lives in the South | 42.6 | 41.9 | 42.4 |
| Total | 100.0 | 100.0 | 100.0 |
| Race | |||
| White | 6,047 | 2,086 | 8,133 |
| Black | 2,452 | 482 | 2,934 |
| Other | 103 | 43 | 146 |
| Total | 8,602 | 2,611 | 11,213 |
| % | % | % | |
| White | 74.4 | 25.6 | 100.0 |
| Black | 83.6 | 16.4 | 100.0 |
| Other | 70.3 | 29.7 | 100.0 |
| Total | 76.7 | 23.3 | 100.0 |
| % | % | % | |
| White | 70.3 | 79.9 | 72.5 |
| Black | 28.5 | 18.5 | 26.2 |
| Other | 1.2 | 1.7 | 1.3 |
| Total | 100.0 | 100.0 | 100.0 |
Source: nlsw88.dta
Table 6: Same example with refinements
| Education | |||
| Not college graduate | College graduate | Total | |
| Location | |||
| Does not live in the South | 4,941 | 1,516 | 6,458 |
| Lives in the South | 3,661 | 1,095 | 4,756 |
| Total | 8,602 | 2,611 | 11,213 |
| Does not live in the South | 76.5% | 23.5% | 100.0% |
| Lives in the South | 77.0% | 23.0% | 100.0% |
| Total | 76.7% | 23.3% | 100.0% |
| Does not live in the South | 57.4% | 58.1% | 57.6% |
| Lives in the South | 42.6% | 41.9% | 42.4% |
| Total | 100.0% | 100.0% | 100.0% |
| Race | |||
| White | 6,047 | 2,086 | 8,133 |
| Black | 2,452 | 482 | 2,934 |
| Other | 103 | 43 | 146 |
| Total | 8,602 | 2,611 | 11,213 |
| White | 74.4% | 25.6% | 100.0% |
| Black | 83.6% | 16.4% | 100.0% |
| Other | 70.3% | 29.7% | 100.0% |
| Total | 76.7% | 23.3% | 100.0% |
| White | 70.3% | 79.9% | 72.5% |
| Black | 28.5% | 18.5% | 26.2% |
| Other | 1.2% | 1.7% | 1.3% |
| Total | 100.0% | 100.0% | 100.0% |
Source: nlsw88.dta
Table 7: Example of sample counts and stats
| Race | ||||
| White | Black | Other | Total | |
| Col % | Col % | Col % | Col % | |
| Location | ||||
| Does not live in the South | 65.4 | 36.0 | 88.5 | 58.1 |
| Lives in the South | 34.6 | 64.0 | 11.5 | 41.9 |
| Total | 100.0 | 100.0 | 100.0 | 100.0 |
| N | 1,637 | 583 | 26 | 2,246 |
| Pearson chi2(2)= 162.625 | ||||
| P-value= 0.000 | ||||
| Education | ||||
| Not college graduate | 74.3 | 82.3 | 65.4 | 76.3 |
| College graduate | 25.7 | 17.7 | 34.6 | 23.7 |
| Total | 100.0 | 100.0 | 100.0 | 100.0 |
| N | 1,637 | 583 | 26 | 2,246 |
| Pearson chi2(2)= 16.919 | ||||
| P-value= 0.000 | ||||
nlsw88.dta
Table 8: Same example with customisation
| Race | |||||
| White | Black | Other | Total | Chi2 | |
| Col % | Col % | Col % | Col % | Signif | |
| Location | |||||
| Does not live in the South | 65.4 | 36.0 | 88.5 | 58.1 | 162.625 |
| Lives in the South | 34.6 | 64.0 | 11.5 | 41.9 | *** |
| Total | 100.0 | 100.0 | 100.0 | 100.0 | |
| Sample size | 1,637 | 583 | 26 | 2,246 | |
| Education | |||||
| Not college graduate | 74.3 | 82.3 | 65.4 | 76.3 | 16.919 |
| College graduate | 25.7 | 17.7 | 34.6 | 23.7 | *** |
| Total | 100.0 | 100.0 | 100.0 | 100.0 | |
| Sample size | 1,637 | 583 | 26 | 2,246 | |
nlsw88.dta
Table 9: A oneway table
| Count | Col % | Cum % | Sample | |
| Industry | ||||
| Ag/Forestry/Fisheries | 84 | 0.8 | 0.8 | 17 |
| Mining | 14 | 0.1 | 0.9 | 4 |
| Construction | 160 | 1.4 | 2.3 | 29 |
| Manufacturing | 1,848 | 16.6 | 18.9 | 367 |
| Transport/Comm/Utility | 433 | 3.9 | 22.8 | 90 |
| Wholesale/Retail Trade | 1,685 | 15.1 | 37.9 | 333 |
| Finance/Ins/Real Estate | 970 | 8.7 | 46.7 | 192 |
| Business/Repair Svc | 429 | 3.9 | 50.5 | 86 |
| Personal Services | 472 | 4.2 | 54.8 | 97 |
| Entertainment/Rec Svc | 99 | 0.9 | 55.6 | 17 |
| Professional Services | 4,151 | 37.3 | 92.9 | 824 |
| Public Administration | 786 | 7.1 | 100.0 | 176 |
| Total | 11,129 | 100.0 | 2,232 | |
| Occupation | ||||
| Professional/technical | 1,477 | 13.2 | 13.2 | 317 |
| Managers/admin | 1,322 | 11.8 | 25.1 | 264 |
| Sales | 3,626 | 32.5 | 57.5 | 726 |
| Clerical/unskilled | 511 | 4.6 | 62.1 | 102 |
| Craftsmen | 239 | 2.1 | 64.2 | 53 |
| Operatives | 1,305 | 11.7 | 75.9 | 246 |
| Transport | 136 | 1.2 | 77.1 | 28 |
| Laborers | 1,491 | 13.4 | 90.5 | 286 |
| Farmers | 8 | 0.1 | 90.5 | 1 |
| Farm laborers | 40 | 0.4 | 90.9 | 9 |
| Service | 75 | 0.7 | 91.6 | 16 |
| Household workers | 3 | 0.0 | 91.6 | 2 |
| Other | 938 | 8.4 | 100.0 | 187 |
| Total | 11,171 | 100.0 | 2,237 | |
Source: nlsw88.dta
Table 10: Simple twoway summary table of means
| Car type (mean weight in lbs.) | |||
| Domestic | Foreign | Total | |
| 1 | 3,100 | 3,100 | |
| 2 | 3,354 | 3,354 | |
| 3 | 3,442 | 2,010 | 3,299 |
| 4 | 3,532 | 2,208 | 2,870 |
| 5 | 1,960 | 2,403 | 2,323 |
| Total | 3,368 | 2,263 | 3,032 |
auto.dta
Table 11: Simple twoway summary table of medians
| Candidate voted for, 1992 | ||||
| Clinton | Bush | Perot | Total | |
| % | % | % | % | |
| <$15k | 8.3 | 3.2 | 2.5 | 3.2 |
| $15-30k | 10.8 | 8.4 | 4.8 | 8.4 |
| $30-50k | 12.3 | 11.4 | 6.3 | 11.4 |
| $50-75k | 8.0 | 8.4 | 3.6 | 8.0 |
| $75k+ | 4.7 | 6.2 | 2.1 | 4.7 |
| Total | 8.3 | 8.4 | 3.6 | 6.3 |
voter.dta
Table 12: Oneway summary table illustrating multiple summary measures
| Mean | Median | ||||
| MPG | Weight (lbs) | Length (in) | Price | Headroom (in) | |
| Car type | |||||
| Domestic (70%) | 19.8 | 3,317.1 | 196.1 | $4,782.50 | 3.5 |
| Foreign (29%) | 24.8 | 2,315.9 | 168.5 | $5,759.00 | 2.5 |
| Repair Record 1978 | |||||
| 1 (2%) | 21.0 | 3,100.0 | 189.0 | $4,564.50 | 1.8 |
| 2 (11%) | 19.1 | 3,353.8 | 199.4 | $4,638.00 | 3.8 |
| 3 (43%) | 19.4 | 3,299.0 | 194.0 | $4,741.00 | 3.5 |
| 4 (26%) | 21.7 | 2,870.0 | 184.8 | $5,751.50 | 3.0 |
| 5 (15%) | 27.4 | 2,322.7 | 170.2 | $5,397.00 | 2.5 |
Source: auto.dta
Table 13: Oneway summary table with default headings
| age | age | studytime | studytime | studytime | |
| Patient died | |||||
| No | 54.2 | 8.0 | 19.0 | 6.0 | 39.0 |
| Yes | 56.8 | 9.0 | 11.0 | 1.0 | 33.0 |
| Total | 55.9 | 9.5 | 12.5 | 1.0 | 39.0 |
| Drug type | |||||
| Placebo | 56.0 | 8.5 | 8.0 | 1.0 | 23.0 |
| Trial drug 1 | 56.9 | 12.0 | 14.0 | 6.0 | 32.0 |
| Trial drug 2 | 54.6 | 8.0 | 26.5 | 6.0 | 39.0 |
| Total | 55.9 | 9.5 | 12.5 | 1.0 | 39.0 |
Source: cancer.dta
Table 14: Same oneway summary table
with customised headings
| Patient age (years) | Length of study (months) | ||||
| Mean | IQR | Median | Minimum | Maximum | |
| Patient died | |||||
| No | 54.2 | 8.0 | 19.0 | 6.0 | 39.0 |
| Yes | 56.8 | 9.0 | 11.0 | 1.0 | 33.0 |
| Total | 55.9 | 9.5 | 12.5 | 1.0 | 39.0 |
| Drug type | |||||
| Placebo | 56.0 | 8.5 | 8.0 | 1.0 | 23.0 |
| Trial drug 1 | 56.9 | 12.0 | 14.0 | 6.0 | 32.0 |
| Trial drug 2 | 54.6 | 8.0 | 26.5 | 6.0 | 39.0 |
| Total | 55.9 | 9.5 | 12.5 | 1.0 | 39.0 |
Source: cancer.dta. Note that IQR is interquartile range
Table 16: Survey data example
| Diabetes | ||||||
| No | Yes | Total | Sample size | |||
| Prop. | CI | Prop. | CI | Prop. | ||
| Race | ||||||
| White | 0.968 | [0.964-0.972] | 0.032 | [0.028-0.036] | 1.000 | 9,063 |
| Black | 0.941 | [0.927-0.952] | 0.059 | [0.048-0.073] | 1.000 | 1,086 |
| Other | 0.980 | [0.957-0.991] | 0.020 | [0.009-0.043] | 1.000 | 200 |
| Total | 0.966 | [0.962-0.969] | 0.034 | [0.031-0.038] | 1.000 | 10,349 |
| Pearson: Uncorrected chi2(2)= 21.348 | ||||||
| Design-based F(1.52, 47.26)= 15.006 | ||||||
| P-value= 0.000 | ||||||
| Sex | ||||||
| Male | 0.971 | [0.965-0.976] | 0.029 | [0.024-0.035] | 1.000 | 4,915 |
| Female | 0.961 | [0.955-0.966] | 0.039 | [0.034-0.045] | 1.000 | 5,434 |
| Total | 0.966 | [0.962-0.969] | 0.034 | [0.031-0.038] | 1.000 | 10,349 |
| Pearson: Uncorrected chi2(1)= 7.490 | ||||||
| Design-based F(1.00, 31.00)= 6.201 | ||||||
| P-value= 0.018 | ||||||
Source: nhanes2b
Table 17: Survey data example with lb and ub options
| Diabetes | ||||||||
| No | Yes | Total | Sample size | |||||
| Prop. | LB | UB | Prop. | LB | UB | Prop. | ||
| Race | ||||||||
| White | 0,968 | 0,964 | 0,972 | 0,032 | 0,028 | 0,036 | 1,000 | 9.063 |
| Black | 0,941 | 0,927 | 0,952 | 0,059 | 0,048 | 0,073 | 1,000 | 1.086 |
| Other | 0,980 | 0,957 | 0,991 | 0,020 | 0,009 | 0,043 | 1,000 | 200 |
| Total | 0,966 | 0,962 | 0,969 | 0,034 | 0,031 | 0,038 | 1,000 | 10.349 |
| Pearson: Uncorrected chi2(2)= 21,348 | ||||||||
| Design-based F(1,52, 47,26)= 15,006 | ||||||||
| P-value= 0,000 | ||||||||
| Sex | ||||||||
| Male | 0,971 | 0,965 | 0,976 | 0,029 | 0,024 | 0,035 | 1,000 | 4.915 |
| Female | 0,961 | 0,955 | 0,966 | 0,039 | 0,034 | 0,045 | 1,000 | 5.434 |
| Total | 0,966 | 0,962 | 0,969 | 0,034 | 0,031 | 0,038 | 1,000 | 10.349 |
| Pearson: Uncorrected chi2(1)= 7,490 | ||||||||
| Design-based F(1,00, 31,00)= 6,201 | ||||||||
| P-value= 0,018 | ||||||||
Source: nhanes2b. Note: lb lower bound; ub upper bound.
Table 18: Survey data example with standard errors
| Diabetes | ||||||
| No | Yes | Total | Sample size | |||
| Prop. | SE | Prop. | SE | Prop. | ||
| Race | ||||||
| White | 1.0 | (0.002) | 0.0 | (0.002) | 1.0 | 9,063 |
| Black | 0.9 | (0.006) | 0.1 | (0.006) | 1.0 | 1,086 |
| Other | 1.0 | (0.008) | 0.0 | (0.008) | 1.0 | 200 |
| Total | 1.0 | (0.002) | 0.0 | (0.002) | 1.0 | 10,349 |
| Pearson: Uncorrected chi2(2)= 21.348 | ||||||
| Design-based F(1.52, 47.26)= 15.006 | ||||||
| P-value= 0.000 | ||||||
| Sex | ||||||
| Male | 1.0 | (0.003) | 0.0 | (0.003) | 1.0 | 4,915 |
| Female | 1.0 | (0.003) | 0.0 | (0.003) | 1.0 | 5,434 |
| Total | 1.0 | (0.002) | 0.0 | (0.002) | 1.0 | 10,349 |
| Pearson: Uncorrected chi2(1)= 7.490 | ||||||
| Design-based F(1.00, 31.00)= 6.201 | ||||||
| P-value= 0.018 | ||||||
Source: nhanes2b.
Table 19: Survey data with stars for significance
| Diabetes | |||||||
| No | Yes | Total | Sample size | Significance | |||
| Prop. | SE | Prop. | SE | Prop. | |||
| Race | |||||||
| White | 1.0 | 0.002 | 0.0 | 0.002 | 1.0 | 9,063 | *** |
| Black | 0.9 | 0.006 | 0.1 | 0.006 | 1.0 | 1,086 | |
| Other | 1.0 | 0.008 | 0.0 | 0.008 | 1.0 | 200 | |
| Total | 1.0 | 0.002 | 0.0 | 0.002 | 1.0 | 10,349 | |
| Sex | |||||||
| Male | 1.0 | 0.003 | 0.0 | 0.003 | 1.0 | 4,915 | * |
| Female | 1.0 | 0.003 | 0.0 | 0.003 | 1.0 | 5,434 | |
| Total | 1.0 | 0.002 | 0.0 | 0.002 | 1.0 | 10,349 | |
Source: nhanes2b.
Table 20: Twoway summary table with survey data
| Education | ||||||
| Not college graduate | College graduate | Total | ||||
| Mean wage | SE | Mean wage | SE | Mean wage | SE | |
| Occupation | ||||||
| Professional/technical (n=317) | 10.01 | (0.70) | 12.22 | (0.68) | 11.04 | (0.49) |
| Managers/admin (n=264) | 10.10 | (0.65) | 14.40 | (0.99) | 11.29 | (0.56) |
| Sales (n=726) | 6.68 | (0.18) | 9.33 | (0.98) | 6.98 | (0.20) |
| Clerical/unskilled (n=102) | 8.52 | (1.05) | 9.05 | (1.40) | 8.62 | (0.89) |
| Craftsmen (n=53) | 7.03 | (0.72) | 10.47 | (1.98) | 7.48 | (0.71) |
| Operatives (n=246) | 5.65 | (0.28) | 4.21 | (1.54) | 5.62 | (0.28) |
| Transport (n=28) | 3.03 | (0.31) | 3.03 | (0.31) | ||
| Laborers (n=286) | 4.66 | (0.22) | 6.46 | (1.12) | 4.78 | (0.22) |
| Farmers (n=1) | 8.05 | (0.00) | 8.05 | (0.00) | ||
| Farm laborers (n=9) | 3.14 | (0.28) | 2.51 | (0.00) | 3.13 | (0.28) |
| Service (n=16) | 5.74 | (0.46) | 4.03 | (0.00) | 5.54 | (0.44) |
| Household workers (n=2) | 6.24 | (0.08) | 6.24 | (0.08) | ||
| Other (n=187) | 4.83 | (0.68) | 9.23 | (0.31) | 8.95 | (0.31) |
| Total (n=2,237) | 6.88 | (0.15) | 10.59 | (0.32) | 7.75 | (0.14) |
| Location | ||||||
| Does not live in the South (n=1,304) | 7.58 | (0.22) | 10.92 | (0.42) | 8.37 | (0.20) |
| Lives in the South (n=942) | 5.94 | (0.19) | 10.12 | (0.50) | 6.90 | (0.20) |
| Total (n=2,246) | 6.88 | (0.15) | 10.59 | (0.32) | 7.74 | (0.14) |
| Race | ||||||
| White (n=1,637) | 7.33 | (0.20) | 10.28 | (0.32) | 8.09 | (0.17) |
| Black (n=583) | 5.78 | (0.17) | 11.93 | (1.02) | 6.79 | (0.25) |
| Other (n=26) | 6.68 | (0.81) | 10.48 | (2.50) | 7.81 | (0.98) |
| Total (n=2,246) | 6.88 | (0.15) | 10.59 | (0.32) | 7.74 | (0.14) |
Source: nslw88.dta
Table 21: Twoway summary table with row layout
| Education | |||
| Not college graduate | College graduate | Total | |
| Average wage | |||
| Occupation | |||
| Professional/technical (n=317) | 10.01 | 12.22 | 11.04 |
| (90% CI) | [8.86,11.17] | [11.10,13.33] | [10.23,11.85] |
| Managers/admin (n=264) | 10.10 | 14.40 | 11.29 |
| (90% CI) | [9.03,11.17] | [12.77,16.03] | [10.37,12.21] |
| Sales (n=726) | 6.68 | 9.33 | 6.98 |
| (90% CI) | [6.39,6.97] | [7.72,10.95] | [6.66,7.30] |
| Clerical/unskilled (n=102) | 8.52 | 9.05 | 8.62 |
| (90% CI) | [6.79,10.24] | [6.74,11.35] | [7.15,10.09] |
| Craftsmen (n=53) | 7.03 | 10.47 | 7.48 |
| (90% CI) | [5.84,8.21] | [7.21,13.72] | [6.31,8.65] |
| Operatives (n=246) | 5.65 | 4.21 | 5.62 |
| (90% CI) | [5.19,6.11] | [1.67,6.75] | [5.17,6.07] |
| Transport (n=28) | 3.03 | 3.03 | |
| (90% CI) | [2.53,3.53] | [2.53,3.53] | |
| Laborers (n=286) | 4.66 | 6.46 | 4.78 |
| (90% CI) | [4.30,5.03] | [4.62,8.30] | [4.41,5.14] |
| Farmers (n=1) | 8.05 | 8.05 | |
| (90% CI) | [8.05,8.05] | [8.05,8.05] | |
| Farm laborers (n=9) | 3.14 | 2.51 | 3.13 |
| (90% CI) | [2.68,3.60] | [2.51,2.51] | [2.68,3.59] |
| Service (n=16) | 5.74 | 4.03 | 5.54 |
| (90% CI) | [4.98,6.50] | [4.03,4.03] | [4.82,6.27] |
| Household workers (n=2) | 6.24 | 6.24 | |
| (90% CI) | [6.10,6.38] | [6.10,6.38] | |
| Other (n=187) | 4.83 | 9.23 | 8.95 |
| (90% CI) | [3.72,5.95] | [8.71,9.74] | [8.45,9.46] |
| Total (n=2,237) | 6.88 | 10.59 | 7.75 |
| (90% CI) | [6.63,7.13] | [10.05,11.12] | [7.52,7.99] |
| Location | |||
| Does not live in the South (n=1,304) | 7.58 | 10.92 | 8.37 |
| (90% CI) | [7.22,7.94] | [10.23,11.62] | [8.04,8.70] |
| Lives in the South (n=942) | 5.94 | 10.12 | 6.90 |
| (90% CI) | [5.62,6.25] | [9.30,10.94] | [6.58,7.22] |
| Total (n=2,246) | 6.88 | 10.59 | 7.74 |
| (90% CI) | [6.63,7.13] | [10.05,11.12] | [7.51,7.98] |
Source: nslw88.dta
Table 22: Unnecessary columns
| Race | ||||||||
| White | Black | Other | Total | |||||
| No. | % | No. | % | No. | % | No. | % | |
| Location | ||||||||
| Does not live in the South | 5,248 | 81 | 1,086 | 17 | 123 | 2 | 6,458 | 100 |
| Lives in the South | 2,884 | 61 | 1,848 | 39 | 23 | 0 | 4,756 | 100 |
| Total | 8,133 | 73 | 2,934 | 26 | 146 | 1 | 11,213 | 100 |
| Sex | ||||||||
| Male | 1,999 | 74 | 689 | 25 | 17 | 1 | 2,705 | 100 |
| Female | 6,108 | 72 | 2,239 | 26 | 128 | 2 | 8,475 | 100 |
| Total | 8,107 | 73 | 2,928 | 26 | 146 | 1 | 11,180 | 100 |
| Member of a union | ||||||||
| Not a union member | 5,195 | 74 | 1,708 | 24 | 106 | 2 | 7,010 | 100 |
| Union member | 1,447 | 64 | 785 | 35 | 37 | 2 | 2,269 | 100 |
| Total | 6,642 | 72 | 2,493 | 27 | 143 | 2 | 9,279 | 100 |
Source: nlsw88.dta
Table 23: Dropping columns
| Race | |||||
| White | Black | Total | |||
| No. | Row % | No. | Row % | No. | |
| Location | |||||
| Does not live in the South | 5,248 | 81 | 1,086 | 17 | 6,458 |
| Lives in the South | 2,884 | 61 | 1,848 | 39 | 4,756 |
| Total | 8,133 | 73 | 2,934 | 26 | 11,213 |
| Sex | |||||
| Male | 1,999 | 74 | 689 | 25 | 2,705 |
| Female | 6,108 | 72 | 2,239 | 26 | 8,475 |
| Total | 8,107 | 73 | 2,928 | 26 | 11,180 |
| Member of a union | |||||
| Not a union member | 5,195 | 74 | 1,708 | 24 | 7,010 |
| Union member | 1,447 | 64 | 785 | 35 | 2,269 |
| Total | 6,642 | 72 | 2,493 | 27 | 9,279 |
Source: nlsw88.dta. Note that Other category has been omitted, so totals will not be accurate.
Table 24: Dropping rows
| Member of a union | ||||||
| Not a union member | Union member | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 3,665 | 52 | 1,589 | 70 | 5,254 | 57 |
| Lives in the South | 3,345 | 48 | 680 | 30 | 4,024 | 43 |
| Total | 7,010 | 100 | 2,269 | 100 | 9,279 | 100 |
| Sex | ||||||
| Male | 1,701 | 24 | 569 | 25 | 2,270 | 25 |
| Female | 5,288 | 76 | 1,694 | 75 | 6,982 | 75 |
| Total | 6,989 | 100 | 2,263 | 100 | 9,252 | 100 |
| Race | ||||||
| White | 5,195 | 74 | 1,447 | 64 | 6,642 | 72 |
| Black | 1,708 | 24 | 785 | 35 | 2,493 | 27 |
| Total | 7,010 | 100 | 2,269 | 100 | 9,279 | 100 |
Source: nlsw88.dta. Note that Other category has been omitted, so totals will not be accurate.
Table 25: Problem with gaps
| Sex | ||||||
| Male | Female | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 1,510 | 56 | 4,927 | 58 | 6,437 | 58 |
| Lives in the South | 1,195 | 44 | 3,548 | 42 | 4,743 | 42 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
| Currently pregnant | ||||||
| Pregnant | 2,972 | 35 | 2,972 | 35 | ||
| Not pregnant | 5,503 | 65 | 5,503 | 65 | ||
| Total | 8,475 | 100 | 8,475 | 100 | ||
| Member of a union | ||||||
| Not a union member | 1,701 | 75 | 5,288 | 76 | 6,989 | 76 |
| Union member | 569 | 25 | 1,694 | 24 | 2,263 | 24 |
| Total | 2,270 | 100 | 6,982 | 100 | 9,252 | 100 |
| Race | ||||||
| White | 1,999 | 74 | 6,108 | 72 | 8,107 | 73 |
| Black | 689 | 25 | 2,239 | 26 | 2,928 | 26 |
| Other | 17 | 1 | 128 | 2 | 146 | 1 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
Source: nlsw88.dta
Table 26: Plugging columns
| Sex | ||||||
| Male | Female | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 1,510 | 56 | 4,927 | 58 | 6,437 | 58 |
| Lives in the South | 1,195 | 44 | 3,548 | 42 | 4,743 | 42 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
| Currently pregnant | ||||||
| Pregnant | NA | NA | 2,972 | 35 | 2,972 | 35 |
| Not pregnant | NA | NA | 5,503 | 65 | 5,503 | 65 |
| Total | NA | NA | 8,475 | 100 | 8,475 | 100 |
| Member of a union | ||||||
| Not a union member | 1,701 | 75 | 5,288 | 76 | 6,989 | 76 |
| Union member | 569 | 25 | 1,694 | 24 | 2,263 | 24 |
| Total | 2,270 | 100 | 6,982 | 100 | 9,252 | 100 |
| Race | ||||||
| White | 1,999 | 74 | 6,108 | 72 | 8,107 | 73 |
| Black | 689 | 25 | 2,239 | 26 | 2,928 | 26 |
| Other | 17 | 1 | 128 | 2 | 146 | 1 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
Source: nlsw88.dta
Table 27: Plugging columns - a problem
| Sex | ||||||
| Female | Total | |||||
| No. | % | No. | % | |||
| Currently pregnant | ||||||
| Pregnant | 2,972 | 35 | 2,972 | 35 | ||
| Not pregnant | 5,503 | 65 | 5,503 | 65 | ||
| Total | 8,475 | 100 | 8,475 | 100 | ||
| Location | ||||||
| Does not live in the South | 1,510 | 56 | 4,927 | 58 | 6,437 | 58 |
| Lives in the South | 1,195 | 44 | 3,548 | 42 | 4,743 | 42 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
| Member of a union | ||||||
| Not a union member | 1,701 | 75 | 5,288 | 76 | 6,989 | 76 |
| Union member | 569 | 25 | 1,694 | 24 | 2,263 | 24 |
| Total | 2,270 | 100 | 6,982 | 100 | 9,252 | 100 |
| Race | ||||||
| White | 1,999 | 74 | 6,108 | 72 | 8,107 | 73 |
| Black | 689 | 25 | 2,239 | 26 | 2,928 | 26 |
| Other | 17 | 1 | 128 | 2 | 146 | 1 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
Source: nlsw88.dta
Table 28: Plugging columns - fixing the problem
| Sex | ||||||
| Male | Female | Total | ||||
| No. | % | No. | % | No. | % | |
| Currently pregnant | ||||||
| Pregnant | 2,972 | 35 | 2,972 | 35 | ||
| Not pregnant | 5,503 | 65 | 5,503 | 65 | ||
| Total | 8,475 | 100 | 8,475 | 100 | ||
| Location | ||||||
| Does not live in the South | 1,510 | 56 | 4,927 | 58 | 6,437 | 58 |
| Lives in the South | 1,195 | 44 | 3,548 | 42 | 4,743 | 42 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
| Member of a union | ||||||
| Not a union member | 1,701 | 75 | 5,288 | 76 | 6,989 | 76 |
| Union member | 569 | 25 | 1,694 | 24 | 2,263 | 24 |
| Total | 2,270 | 100 | 6,982 | 100 | 9,252 | 100 |
| Race | ||||||
| White | 1,999 | 74 | 6,108 | 72 | 8,107 | 73 |
| Black | 689 | 25 | 2,239 | 26 | 2,928 | 26 |
| Other | 17 | 1 | 128 | 2 | 146 | 1 |
| Total | 2,705 | 100 | 8,475 | 100 | 11,180 | 100 |
Source: nlsw88.dta
Table 29: Twoway summary table showing use of h3c
| Education | |||
| Not college graduate | College graduate | Total | |
| Average wage | |||
| Does not live in the South (n=1,304) | 7.58 | 10.92 | 8.37 |
| [7.22,7.94] | [10.23,11.62] | [8.04,8.70] | |
| Lives in the South (n=942) | 5.94 | 10.12 | 6.90 |
| [5.62,6.25] | [9.30,10.94] | [6.58,7.22] | |
| Total (n=2,246) | 6.88 | 10.59 | 7.74 |
| [6.63,7.13] | [10.05,11.12] | [7.51,7.98] | |
Source: nslw88.dta
Table 30: Plugging rows - the problem
| Currently pregnant | ||||||
| Pregnant | Not pregnant | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 1,913 | 39 | 3,035 | 61 | 4,948 | 100 |
| Lives in the South | 1,058 | 30 | 2,502 | 70 | 3,560 | 100 |
| Total | 2,972 | 35 | 5,536 | 65 | 8,508 | 100 |
| Member of a union | ||||||
| Not a union member | 1,708 | 32 | 3,601 | 68 | 5,309 | 100 |
| Union member | 694 | 41 | 1,005 | 59 | 1,700 | 100 |
| Total | 2,402 | 34 | 4,607 | 66 | 7,009 | 100 |
| Race | ||||||
| White | 2,212 | 36 | 3,921 | 64 | 6,134 | 100 |
| Black | 713 | 32 | 1,533 | 68 | 2,246 | 100 |
| Other | 47 | 36 | 82 | 64 | 129 | 100 |
| Total | 2,972 | 35 | 5,536 | 65 | 8,508 | 100 |
| Sex | ||||||
| Female | 2,972 | 35 | 5,503 | 65 | 8,475 | 100 |
| Total | 2,972 | 35 | 5,503 | 65 | 8,475 | 100 |
Source: nlsw88.dta
Table 31: Plugging rows - the solution
| Currently pregnant | ||||||
| Pregnant | Not pregnant | Total | ||||
| No. | % | No. | % | No. | % | |
| Location | ||||||
| Does not live in the South | 1,913 | 39 | 3,035 | 61 | 4,948 | 100 |
| Lives in the South | 1,058 | 30 | 2,502 | 70 | 3,560 | 100 |
| Total | 2,972 | 35 | 5,536 | 65 | 8,508 | 100 |
| Member of a union | ||||||
| Not a union member | 1,708 | 32 | 3,601 | 68 | 5,309 | 100 |
| Union member | 694 | 41 | 1,005 | 59 | 1,700 | 100 |
| Total | 2,402 | 34 | 4,607 | 66 | 7,009 | 100 |
| Race | ||||||
| White | 2,212 | 36 | 3,921 | 64 | 6,134 | 100 |
| Black | 713 | 32 | 1,533 | 68 | 2,246 | 100 |
| Other | 47 | 36 | 82 | 64 | 129 | 100 |
| Total | 2,972 | 35 | 5,536 | 65 | 8,508 | 100 |
| Sex | ||||||
| Male* | 0 | 0 | 0 | 0 | 0 | 0 |
| Female | 2,972 | 35 | 5,503 | 65 | 8,475 | 100 |
| Total | 2,972 | 35 | 5,503 | 65 | 8,475 | 100 |
Source: nlsw88.dta. Note: * No male pregnancies have been reported.