Export xtsum
xtsum
, a generalization of summarize
, reports means and standard deviations for panel data; it differs from summarize
in that it decomposes the standard deviation into between and within components. Exporting its table is as easy as adding asdocx
to the beginning of the command. See the following examples.
* Load example data webuse nlswork * Default case asdocx xtsum race grade , replace
Table: Results
Variable | Mean | Std. Dev. | Min | Max | Observations | ||
---|---|---|---|---|---|---|---|
race | overall | 1.303 | 0.482 | 1 | 3 | N = | 28534 |
between | 0.486 | 1 | 3 | n = | 4711 | ||
within | 0 | 1.303 | 1.303 | T-bar = | 6.057 | ||
grade | overall | 12.533 | 2.324 | 0 | 18 | N = | 28532 |
between | 2.567 | 0 | 18 | n = | 4709 | ||
within | 0 | 12.533 | 12.533 | T-bar = | 6.059 | ||
Notes: |
* Use labels asdocx xtsum race grade , replace label
Table: Results
Variable | Mean | Std. Dev. | Min | Max | Observations | ||
---|---|---|---|---|---|---|---|
Race | overall | 1.303 | 0.482 | 1 | 3 | N = | 28534 |
between | 0.486 | 1 | 3 | n = | 4711 | ||
within | 0 | 1.303 | 1.303 | T-bar = | 6.057 | ||
Current grade completed | overall | 12.533 | 2.324 | 0 | 18 | N = | 28532 |
between | 2.567 | 0 | 18 | n = | 4709 | ||
within | 0 | 12.533 | 12.533 | T-bar = | 6.059 | ||
Notes: |
* Two decimal points asdocx xtsum race grade , replace label dec(2)
Table: Results
Variable | Mean | Std. Dev. | Min | Max | Observations | ||
---|---|---|---|---|---|---|---|
Race | overall | 1.3 | 0.48 | 1 | 3 | N = | 28534 |
between | 0.49 | 1 | 3 | n = | 4711 | ||
within | 0 | 1.3 | 1.3 | T-bar = | 6.06 | ||
Current grade completed | overall | 12.53 | 2.32 | 0 | 18 | N = | 28532 |
between | 2.57 | 0 | 18 | n = | 4709 | ||
within | 0 | 12.53 | 12.53 | T-bar = | 6.06 | ||
Notes: |