Title

spex -- Run examples and load data to demonstrate SPost13 commands

General syntax

spex [modelname] [filename] [commandname]
[ , web local copy ]

Description

spex allows users to easily use load data, fit models, and try commands from
Long and Freese's Regression Models for Categorical Dependent Variables
Using Stata. Typing spex filename loads the specified
example dataset. Typing spex modelname fits that
model using data and an example specification from the book. Typing
spex commandname runs a postestimation command after loading
data and running a regression model. spex often runs multiple commands.
Each command spex runs is listed in Stata's Review window.

Available Examples, Files, and Commands

Regression models fit by spex

Binary regression models

logit Logistic regression model

probit Probit regression model

cloglog Complementary log-log regression model

svy Logistic regression model with complex survey sampling

Ordinal regression models

ologit Ordered logistic regression model

oprobit Ordered probit regression model

rologit Rank-ordered logistic regression model

Nominal regression models

mlogit Multinomial logistic regression model

mprobit Multinomial probit regression model

slogit Stereotype logistic regression model

asclogit Alternative-specific conditional logit regression model

asmprobit Alternative-specific multinomial probit regression

Count regression models

poisson Poisson regression model

nbreg Negative binomial regression model

ztnb Truncated negative binomial regression model

tnbreg Truncated negative binomial regression model

ztp Truncated Poisson regression model

tpoisson Truncated Poisson regression model

zip Zero-inflated Poisson regression model

zinb Zero-inflated negative binomial regression model

Linear regression models

regress Linear regression model

tobit Tobit regression model

intreg Interval regression model

Data compatible with spex

Many datasets are accessible using spex. Visit
http://www.indiana.edu/~jslsoc/stata/spex_data/
for a list of available datasets.

Commands compatible with spex

fitstat Compute scalar measures of fit. See fitstat.

listcoef Lists various regression coefficients. See listcoef.

margins Computes marginal means, predictive margins, and marginal effects. See margins.

mchange Computes marginal effects. See mchange.

mtable Constructs tables of predictions. See mtable.

mgen Generates variables for plotting predictions. See mgen.

mlincom Computes linear combinations of margins estimates. See mlincom.

Options

local data are to be loaded from the working directory
or somewhere else along the user's adopath (somewhere accessible
via sysuse). This is the default.

web loads data from their location
on the spost website (http://www.indiana.edu/~jslsoc/stata/spex_data/).

copy copies dataset to the working directory..

Notes

When specifying an estimation command with spex, you can add other
options (e.g., "nolog") and these will be passed along as additional options
to the estimation command.

Examples

. spex logit

. spex mtable

. spex couart4