*! version 3.0 06feb2024

Title

gintregplot -- Plot distribution fit by gintreg

Syntax

gintregplot
[[(stat)] varlist ] [(stat) ... ]
[if] [in]
[, options]

and stat is one of

mean means (default)

median medians

p1 1st percentile

p2 2nd percentile

... 3rd-49th percentiles

p50 50th percentile (same as median)

... 51st-97th percentiles

p98 98th percentile

p99 99th percentile

max maximums

min minimums

If stat is not specified, mean is assumed.

Options
hist(varname) overlay histogram of varname

twoway_options options for graph

Description

gintregplot draws the conditional distribution of depvar1 and
depvar2 estimated by gintreg. indepvars are taken at stat
or mean by default.

Options

hist(varname) overlay a histogram of varname; see [R] histogram.

twoway_options control the look and other aspects of the graph drawn by gintregplot;
range(numlist) is recommended; see [G-3] twoway options

Examples

Setup

. webuse intregxmpl

SGT interval regression

. gintreg wage1 wage2 age age2 nev_mar rural school tenure, dist(sgt)

Draw graph with indepvars at mean

. gintregplot, range(0 60)

Draw graph with select indepvars at median or max (remaining indepvars at mean by default)

. gintregplot (median) nev_mar rural (max) tenure, range(0 60)

Draw graph for selected observation(s)

. gintregplot if (age<30), range(0 60)

. gintregplot in 100, range(0 60)

Compare income distributions for rural and urban workers

. gintregplot (min) rural, range(0 60)

. local urban `r(graphfn)'

. gintregplot (max) rural, range(0 60)

. local rural `r(graphfn)'

. graph twoway (function y=`urban') (function y=`rural')

Compare fit of two distributions visually

. gintreg wage1 wage2, dist(normal)

. gintregplot, range(0 60)

. local normal `r(graphfn)'

. gintreg wage1 wage2, dist(snormal)

. gintregplot, range(0 60)

. local snormal `r(graphfn)'

. graph twoway (function y=`normal') (function y=`snormal')

Stored results

gintregplot stores the following in r():

Macros

r(graphfn) function used to draw graph, as in twoway function y=graphfn, twoway_options

Authors

Jacob Triplett

Carnegie Mellon University

jacobtri@andrew.cmu.edu

James B. McDonald

Brigham Young University

james_mcdonald@byu.edu