Hey,
I need to export my chi-square test results into Word. However, my usual go to - outreg2 function - did not work. How do I report the results similar to how it's done below?
[CODE]. ssc install dataex
checking dataex consistency and verifying not already installed...
all files already exist and are up to date.
. tab W1ethgrpYP W1ExcludeYP, chi2 column row
+-------------------+
| Key |
|-------------------|
| frequency |
| row percentage |
| column percentage |
+-------------------+
DV: Young person's |
ethnic group | W1ExcludeYP
(grouped) | Never exc Excluded | Total
----------------------+----------------------+----------
White | 54,212 8,418 | 62,630
| 86.56 13.44 | 100.00
| 57.82 60.67 | 58.19
----------------------+----------------------+----------
Mixed | 4,549 778 | 5,327
| 85.40 14.60 | 100.00
| 4.85 5.61 | 4.95
----------------------+----------------------+----------
Indian | 6,899 576 | 7,475
| 92.29 7.71 | 100.00
| 7.36 4.15 | 6.94
----------------------+----------------------+----------
Pakistani | 9,617 1,129 | 10,746
| 89.49 10.51 | 100.00
| 10.26 8.14 | 9.98
----------------------+----------------------+----------
Bangladeshi | 8,883 1,112 | 9,995
| 88.87 11.13 | 100.00
| 9.47 8.01 | 9.29
----------------------+----------------------+----------
Black Caribbean | 2,558 831 | 3,389
| 75.48 24.52 | 100.00
| 2.73 5.99 | 3.15
----------------------+----------------------+----------
Black African | 4,032 589 | 4,621
| 87.25 12.75 | 100.00
| 4.30 4.25 | 4.29
----------------------+----------------------+----------
Other | 3,012 442 | 3,454
| 87.20 12.80 | 100.00
| 3.21 3.19 | 3.21
----------------------+----------------------+----------
Total | 93,762 13,875 | 107,637
| 87.11 12.89 | 100.00
| 100.00 100.00 | 100.00
Pearson chi2(7) = 700.2526 Pr = 0.000
[CODE]

I need to export my chi-square test results into Word. However, my usual go to - outreg2 function - did not work. How do I report the results similar to how it's done below?
[CODE]. ssc install dataex
checking dataex consistency and verifying not already installed...
all files already exist and are up to date.
. tab W1ethgrpYP W1ExcludeYP, chi2 column row
+-------------------+
| Key |
|-------------------|
| frequency |
| row percentage |
| column percentage |
+-------------------+
DV: Young person's |
ethnic group | W1ExcludeYP
(grouped) | Never exc Excluded | Total
----------------------+----------------------+----------
White | 54,212 8,418 | 62,630
| 86.56 13.44 | 100.00
| 57.82 60.67 | 58.19
----------------------+----------------------+----------
Mixed | 4,549 778 | 5,327
| 85.40 14.60 | 100.00
| 4.85 5.61 | 4.95
----------------------+----------------------+----------
Indian | 6,899 576 | 7,475
| 92.29 7.71 | 100.00
| 7.36 4.15 | 6.94
----------------------+----------------------+----------
Pakistani | 9,617 1,129 | 10,746
| 89.49 10.51 | 100.00
| 10.26 8.14 | 9.98
----------------------+----------------------+----------
Bangladeshi | 8,883 1,112 | 9,995
| 88.87 11.13 | 100.00
| 9.47 8.01 | 9.29
----------------------+----------------------+----------
Black Caribbean | 2,558 831 | 3,389
| 75.48 24.52 | 100.00
| 2.73 5.99 | 3.15
----------------------+----------------------+----------
Black African | 4,032 589 | 4,621
| 87.25 12.75 | 100.00
| 4.30 4.25 | 4.29
----------------------+----------------------+----------
Other | 3,012 442 | 3,454
| 87.20 12.80 | 100.00
| 3.21 3.19 | 3.21
----------------------+----------------------+----------
Total | 93,762 13,875 | 107,637
| 87.11 12.89 | 100.00
| 100.00 100.00 | 100.00
Pearson chi2(7) = 700.2526 Pr = 0.000
[CODE]
Comment