help for seqlogit

Sequential logit model

seqlogit depvar [indepvars] [if] [in] [weight]
,
tree(tree)
[
ofinterest(varname)
over(varlist)
x#(varlist)
levels(#=#, #=#, etc.)
sd(numlist)
deltasd(varname numlist)
rho(#)
{
pr(numlist) |
mn(# # , # # [, # #, etc.]) |
uniform
}
draws(#)
drawstart(#)
or
constraints(numlist)
robust
cluster(clustervar)
nolog
level(#)
maximize_options
]

by ... : may be used with seqlogit; see help
by.

pweights, fweights and iweights are allowed; see
help weights.

indepvars, over() and x#(varlist) may contain factor
variables, see fvvarlist.

Description

seqlogit fits a sequential logit model. This
model is know under a variety of other names: sequential response model
(maddala 1983), continuation ratio logit (Agresti 2002), model for nested
dichotomies (fox 1997), and the Mare model (shavit and blossfeld93) (after
(Mare 1981)).

A sequential logit model can be estimated quite simply by estimating
a number of logit models. The seqlogit package serves three
additional purposes: First, it makes it easier to test hypotheses across
transitions since the entire model is estimated simultaneously. Second, it
implements the decomposition proposed by Buis (2010a) of the effect of an
explanatory variable on the outcome of the process described by the sequential
logit into the contributions of each of the transitions. The implementation is
discussed in seqlogit postestimation. Third, it implements and extends
the strategy proposed by Buis (2011) of doing a sensitivity analysis to
investigate the potential influence of unobserved variables.

For this last purpose, the seqlogit package allows one to
estimate a sequential logit given a scenario concerning the unobserved
variables. These effects will only be estimated when the sd() option is
specified. A regular sequential logit model, which assumes that there is no
unobserved heterogeneity, is estimated if the sd() option is not
specified. The scenarios assume that these unobserved variables either add up
to a standardized normally (Gaussian) distributed variable (the default), or
to a standardized discrete variable (when the pr() option is specified), or
a mixture of normal distributions (when the mn() option is specified), or
a uniform distribution (when the uniform distribution is specified. The
effects of this agregate unobserved variable during each transition are specified
in the sd() option. One can allow the effect of the unobserved variable to
change over another variable using the deltasd() option. The correlation
during the first transition between this unobserved variable and the variable
specified in the ofinterest() option is specified in the rho()
option. The scenarios are estimated using maximum simulated likelihood,
while the regular sequential logit model is estimated using regular maximum
likelihood. Advise on how to use these different scenarios in a sensitivity
analysis is given here: seqlogit_sensitivity.

Options

Model

tree(tree) specifies the sequence of transitions that make up the model.
The transitions are seperated with commas and the choices within transitions
are seperated with colons. The levels are represented by the levels of the
depvar. It is thus convenient to code depvar as a series of integers. For
example, say there are three levels, 1, 2, and 3, and the first transition
consist of a choice between value 1 versus values 2 or 3, and the second
transition consists (for those who didn't choose value 1) of a choice between
values 2 and 3. The tree option should than be: tree(1 : 2 3 , 2 : 3).

All values of depvar must be specified in the tree and all
values in the tree must occur in depvar. Furthermore, all levels must be
reachable through one and only one path through the tree.

ofinterest(varname) specifies the variable whose effect will be
decomposed when using the
seqlogitdecomp command.
The variable specified is added to the list of explanatory variables.

over(varlist) specifies the variable(s) over which the effect of
the variable specified in the ofinterest() option is allowed to change.
This/these variable(s) and the interaction effect between the variable(s)
spefied in over() and ofinterest() are added to the list of
explanatory variables. ofinterest() needs to be specified when
specifying over().

x#(varlist) specifies variables that are to be included in the #th
transition. The number of the transition corresponds with the order in which
it appears in the tree() option. So, if we have specified as
tree(1 : 2 3 : 4 5, 2 : 3, 4 : 5) Than, 1 : 2 3 : 4 5 is the first
transition, 2 : 3 the second, and 4 : 5 the third transition.

levels(#=#, #=#, etc.) specifies the values assigned to each end-state.
For example, if one is studying education, than it would be the value (often
measured in (pseudo-)years of education) of each level of education. The number
to the left of the equal sign is the number used in depvar and the
tree() option, and the number to the right of the equal sign is the value
that is to be assigned to that state. The default is to use the values in
depvar as the values. These values will not influence the model, but will
play an important role in the decomposition of the effects on the final outcome
into the effects on each transitions and weights assigned to each transition, as
implemented in seqlogitdecomp.

A convenient trick is possible when it is hard (impossible) to assign values to the
different stages, but there is one outcome of particular interest. Say, one is
studying the process through which a respondent comes to participate in a survey
as two stages: a potential respondent is succesfully contacted or not, and given
that (s)he is contacted (s)he can decide to participate or not. In that case it
is hard to assign values to the states "not contacted" and "contacted but refused".
However, we typically care about the overall probablity of participating. In
that case we can assign a 1 to "contacted and participated" and a 0 to all other
states. In that case the effect on the final outcome is the effect on the probability
of participating.

constraints(numlist) specifies linear constraints to be applied during
estimation, see constraint.

Scenarios

sd(numlist) specifies for each transition the effect of the
standardized unobserved variable. If only one number is specified, this
effect will be assumed constant over transitions, otherwise the first
number will refer to the first transition, the second number to the second
transition, etc. The default is 0.

deltasd(varname numlist) specifies how the effect of the unobserved
variable changes over varname. If only one number is specified,
this change will be assumed constant over transitions, otherwise the first
number will refer to the first transition, the second number to the second
transition, etc. The default is that the effect of the unobserved variable
is constant over all variables.

rho(#) specifies the correlation of the unobserved variable and the
variable specified in ofinterest(). The default is 0.

The pr(), mn(), and uniform options govern the distribution
of the unobserved variable. They are mutually exclusive. If the pr(),
mn(), and uniform are not specified but the sd() option is
specified, than the unobserved variable will be represented by a standard
normal distribution.

pr(numlist) specifies that the unobserved variable is to be represented
by a discrete distribution. The numbers in pr() represent the
proportion of observations that belong to each category. Since the numbers are
propotions, they all need to be larger than 0 and they need to add up to 1.
The location of these categories will be chosen such that the mean is 0, the
standard deviation is 1, and all categories are separated by the same distance.
The pr() option may not be specified without specifying the sd()
option.

mn(# # , # # [, # #, etc.]) specified that the unobserved variable is to
be represented as a mixture of normal distributions. This option should consist
of multiple elements separated by commas, whereby each element consists of
two numbers, the first is the proprotion the latter a mean of one of the
components of the mixture distribution. The proportions should add up to 1. The
means of the components will be transformed such that the mean of the of the
distribution equals 0. The variances of the components are assumed to be equal
and are choses such that the overall variance equals 1. This means that not
all proportion-mean combination will lead to valid mixture distributions, in
which case seqlogit will report an error and stop.

uniform specifies that the unobserved variable is to be represented by
a uniform distribution with mean 0 and standard deviation 1. This could make
sense when we think that it is the rank order on the unobserved variables that
influences the outcome rather than some metric value, as the distribution of
rank scores is a uniform distribution. This assumption could be justified
when we assume that the unobserved variables are also be hard to observe for
the actors themselves, and that the rank score is easier to observe (Jill is
smarter than Jack, we just don't know how much smarter.).

draws(#) specifies the number of pseudo random draws per observation used
when calculating the simulated likelihood. The default is 100. Because maximum
simulated likelihood is only used when the sd() option is specified, the
draws() option can only be specified when the sd() option is specified.

drawstart(#) specifies the index at which the Halton sequence starts. The
default is 15.

Reporting

or report odds ratios

robust specifies that the Huber/White/sandwich estimator
of variance is to be used in place of the traditional calculation; see
[U] 23.14 Obtaining robust variance estimates. robust
combined with cluster() allows observations which are not
independent within cluster (although they must be independent between
clusters).

cluster(clustervar) specifies that the observations
are independent across groups (clusters) but not necessarily within groups.
clustervar specifies to which group each observation belongs; e.g.,
cluster(personid) in data with repeated observations on individuals. See
[U] 23.14 Obtaining robust variance estimates. Specifying cluster()
implies robust.

level(#) specifies the confidence level, in percent,
for the confidence intervals of the coefficients; see help level.

nolog suppresses an iteration log of the log likelihood

maximize_options:
difficult,
technique(algorithm_spec),
iterate(#),
trace,
gradient,
showstep,
hessian,
shownrtolerance,
tolerance(#),
ltolerance(#),
gtolerance(#),
nrtolerance(#),
nonrtolerance(#);
see maximize. These options are seldom used.

Example

use "http://fmwww.bc.edu/repec/bocode/g/gss.dta", clear

recode degree 4=3
label define degree 0 "lt high school" ///
1 "high school" ///
2 "junior college" ///
3 "college", modify
label value degree degre

seqlogit degree south ///
c.coh##c.coh if black == 0 , ///
tree(0 : 1 2 3 , 1 : 2 3 , 2 : 3 ) ///
ofinterest(paeduc) ///
over(c.coh##c.coh) ///
levels(0=9, 1=12, 2=14, 3=16)

seqlogitdecomp, overat(coh 1.5, ///
coh 2.5, ///
coh 3.5, ///
coh 4.5, ///
coh 5.5, ///
coh 6.5) ///
at(south 0 paeduc 12) ///
yline(0) xline(0) ///
subtitle("1915" "1925" "1935" ///
"1945" "1955" "1965") ///
eqlabel(`""less than high school" "versus" "high school or more""' ///
`""high school" "versus" "any college""' ///
`""junior college" "versus" "college""' )

seqlogitdecomp paeduc, at(coh 1.5 south 0 paeduc 12) table

seqlogit degree south ///
c.coh##c.coh if black == 0 , ///
tree(0 : 1 2 3 , 1 : 2 3 , 2 : 3 ) ///
ofinterest(paeduc) ///
over(c.coh##c.coh) ///
levels(0=9, 1=12, 2=14, 3=16) ///
or sd(1)

uhdesc

Author

Maarten L. Buis, Universitaet Tuebingen
maarten.buis@uni-tuebingen.de

Suggested citation if using seqlogit in published work

seqlogit is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such.

Buis, Maarten L. 2007. "SEQLOGIT: Stata module to fit a sequential logit model"
http://ideas.repec.org/c/boc/bocode/s456843.html

or:

Buis, Maarten L. 2010
``Chapter 6, Not all transitions are equal: The relationship between inequality of
educational opportunities and inequality of educational outcomes'', In:
Buis, Maarten L. ``Inequality of Educational Outcome and Inequality of
Educational Opportunity in the Netherlands during the 20th Century''.
PhD thesis.
http://www.maartenbuis.nl/dissertation/chap_6.pdf

Buis, maarten L. 2011
``The Consequences of Unobserved Heterogeneity in a Sequential Logit Model'',
Research in Social Stratification and Mobility, 29(3), pp. 247-262.

Acknowledgements

I appreciate the useful comments I received at the 2009 Summer meeting of the
RC28, Dominik Becker and Jeremy Freese.

References

Agresti, Alan 2002 .
Categorical Data Analysis, 2nd edition.
Hoboken, NJ: Wiley-Interscience.

Buis, Maarten L. 2010a
``Chapter 6, Not all transitions are equal: The relationship between inequality of
educational opportunities and inequality of educational outcomes'', In:
Buis, Maarten L. ``Inequality of Educational Outcome and Inequality of
Educational Opportunity in the Netherlands during the 20th Century''.
PhD thesis.
http://www.maartenbuis.nl/dissertation/chap_6.pdf

Buis, maarten L. 2011
``The Consequences of Unobserved Heterogeneity in a Sequential Logit Model'',
Research in Social Stratification and Mobility, 29(3), pp. 247-262.
http://dx.doi.org/10.1016/j.rssm.2010.12.006

Fox, John 1997
Applied Regression Analysis, Linear Models, and Related Methods.
Thousand Oaks: Sage.

Maddala, G.S. 1983
Limited Dependent and Qualitative Variables in Econometrics
Cambridge: Cambridge University Press.

Mare, Robert D. 1981
``Change and Stability in educational Stratification''
American Sociological Review, 46(1), p.p. 72-87.

Shavit, Yossi and Hans-Peter Blossfeld 1993
Persistent Inequality: Changing Educational Attainment in Thirteen Countries
Boulder: Westview Press.

Also see

Online: help for seqlogit postestimation, seqlogit_sensitivity help for logit, mlogit