*! version 1.0
help sumqoi

Title

sumqoi -- Summarize quantities of interest

Syntax

sumqoi
[varlist]
[if] [in]
[, options]

Main
statistics:(statname [...])
report specified statistics

Options
format[(%fmt)]
display format for statistics; default format is %9.0g

Reporting
level(#) set confidence level; default is level(95)

centile compute centile-based confidence intervals; the default

normal compute normal-based confidence intervals

by is allowed; see [D] by.

Description

sumqoi summarizes quantities of interest that have been stored as variables in
memory.
By default, sumqoi reports the mean, standard deviation, and a centile-based
confidence interval for the simulated quantities of interest.

Options

Main

statistics(statname [...])
specifies the statistics to be displayed. (stats() is a synonym for
statistics().) Multiple statistics may be specified
and are separated by white space, such as statistics(mean sd).
Available statistics are

statname Definition

mean mean

count count of nonmissing observations

n same as count

sum sum

max maximum

min minimum

range range = max - min

sd standard deviation

variance variance

cv coefficient of variation (sd/mean)

semean standard error of mean (sd/sqrt(n))

skewness skewness

kurtosis kurtosis

p1 1st percentile

p5 5th percentile

p10 10th percentile

p25 25th percentile

median median (same as p50)

p50 50th percentile (same as median)

p75 75th percentile

p90 90th percentile

p95 95th percentile

p99 99th percentile

iqr interquartile range = p75 - p25

q equivalent to specifying p25 p50 p75

Options

format and format(%fmt) specify how the
statistics are to be formatted. The default is to use a %9.0g
format.

Reporting

level(#); see [R] estimation options.

centile specifies calculation of centile-based confidence intervals; the default.

normal specifies calculation of normal-based confidence intervals.

Examples

Setup

. sysuse auto

Simulate parameters via Post-estimation Simulation

. postsim, saving(myfile): regress mpg weight foreign

Simulate expected values at specific values of covariates

. simqoi using myfile, at( foreign=(0 1) ) gen(foo)

Compute first difference

. generate diff = foo_at_2-foo_at_1

Summarize quantity of interest

. sumqoi diff

. sumqoi diff, statistics(median iqr)

. sumqoi diff, normal

Saved results

sumqoi saves the following in r():

Matrices

r(sims) number of observations

r(mean) mean

r(se) standard deviation

r(lb) lower confidence bound

r(ub) upper confidence bound

r(Results) Results

Author

Javier Márquez Peña,

Buendía & Laredo, Mexico City.

javier.marquez@buendiaylaredo.com

http://javier-marquez.com/software/moreclarify

Also see

Help: sumqi (if installed);

[R] summarize, [R] tabstat