Exporting pwcompare results from Stata to Excel, Word, or LaTeX can be efficiently done using asdocx. Here’s how:
Step 1: Run regression model
Before running the pwcompare command, you first need to run your given regression model in Stata. This could be any regression model suitable for your data and research question. After running the regression model, you can then proceed with the pwcompare command.
Step 2: Export the Results using ‘asdocx’
The asdocx command can be used to export the results of pwcompare directly to Excel, Word, HTML, or LaTeX. The syntax is as follows:
asdocx pwcompare variables, pwcompare_options asdocx_options
This command will create a document with the pwcompare results in the format specified by the ‘asdocx_options’
An Example
Let’s use an example from the pwcompare help file.
webuse yield
regress yield i.fertilizer
asdocx pwcompare fertilizer, effects mcompare(duncan) replace
| Coef. | Std. Err. | t-value | p-value | [95% Co | Interval] | Sig | |
|---|---|---|---|---|---|---|---|
| NPK rating: 10-08~10 | 3.623 | 1.590 | 2.28 | 0.031 | 0.322 | 6.924 | ** |
| 16-04-08 vs 10-10-10 | 0.491 | 1.590 | 0.31 | 0.758 | -2.645 | 3.626 | |
| 18-24-06 vs 10-10-10 | 4.923 | 1.590 | 3.10 | 0.004 | 1.512 | 8.334 | *** |
| 29-03-04 vs 10-10-10 | -1.238 | 1.590 | -0.78 | 0.437 | -4.374 | 1.897 | |
| 16-04-08 vs 10-08-22 | -3.132 | 1.590 | -1.97 | 0.050 | -6.268 | 0.004 | * |
| 18-24-06 vs 10-08-22 | 1.300 | 1.590 | 0.82 | 0.415 | -1.836 | 4.436 | |
| 29-03-04 vs 10-08-22 | -4.861 | 1.590 | -3.06 | 0.005 | -8.272 | -1.450 | *** |
| 18-24-06 vs 16-04-08 | 4.432 | 1.590 | 2.79 | 0.008 | 1.131 | 7.733 | *** |
| 29-03-04 vs 16-04-08 | -1.729 | 1.590 | -1.09 | 0.309 | -5.030 | 1.572 | |
| 29-03-04 vs 18-24-06 | -6.161 | 1.590 | -3.87 | 0 | -9.653 | -2.669 | *** |
| Notes: *** p<.01, ** p<.05, * p<.1 | |||||||
See also
- tabmany – Table of multiple coded answers
- mrtab – One- and two-way tables of multiple responses
- fre – One-way frequency tables
- tabcount – tabulates frequencies for up to 7 variables
- tab3way – Three way table of frequencies and percentages
- missings – Various utilities for managing missing values
- tabulate, tab1, tab2
- pctab – Percentage over a grouping variable
- crosstab – table of means and weighted by in cross tabulations
Order asdocx
Yearly license of asdocx is available at $9.99. Its life-time license is available at $49.99. With the asdocx membership, you get :
- Life-time license to use
- All future updates
- All premium templates / plugins.