{smcl}
{* Last revised April 20, 2010}{...}
{hline}
help for {hi:regoprob2}
{hline}


{title:Random Effects Generalized Ordered Probit Estimation with Autofit Option}




{p 4 18 12}
	{cmdab:regoprob2} {it:depvar} [{it:indepvars}]
	[{cmd:if} {it:exp}] [{cmd:in} {it:range}]
	[{cmd:,}
	{cmdab:i:(}{it:varname}{cmd:)}
	{cmdab:q:uadrat(}{it:#}{cmd:)}
	{cmdab:p:l}
	{cmdab:p:l(}{it:varlist}{cmd:)}
	{cmdab:np:l}
	{cmdab:np:l(}{it:varlist}{cmd:)}
	{cmdab:auto:fit}
	{cmdab:auto:fit2(}{it:alpha}{cmd:)}
	{cmdab:c:onstraints:(}{it:clist}{cmd:)}
	{cmdab:l:evel:(}{it:#}{cmd:)}
	{it:maximize_options} ]
{p_end}



{p 4 4 2}
{cmd:regoprob2} shares all the features of the estimation commands; for help see {help est}. 
{cmd:regoprob2} typed without arguments redisplays previous results.
{p_end}



{p 4 4 2}
The syntax of {help predict} following {cmd:regoprob2} is
{p_end}

{p 8 16 2}
{cmd:predict} [{it:type}] {it:newvarname}({it:s})
        [{cmd:if} {it:exp}] [{cmd:in} {it:range}]
	[{cmd:,} {it:statistic} {cmdab:o:utcome:(}{it:outcome}{cmd:)} ]
{p_end}

{p 4 4 2}
where {it:statistic} is
{p_end}

{p 8 21 2}
{cmd:p}{space 8}probability marginal on the individual effect
(specify one new variable and {cmd:outcome()} option, or specify k new
variables, k = # of outcomes); the default
{p_end}
{p 8 21 2}
{cmd:xb}{space 7}linear prediction xb ({cmd:outcome()} option
required)
{p_end}
{p 8 21 2}
{cmd:stdp}{space 5}S.E. of linear prediction ({cmd:outcome()}
option required)
{p_end}
{p 8 21 2}
{cmd:stddp}{space 4}S.E. of difference in linear predictions
({cmd:outcome()} option is {cmd:outcome(}{it:outcome1}{cmd:,}{it:outcome2}{cmd:)})
{p_end}


{p 4 4 2}
Note that you specify one new variable with {cmd:xb}, {cmd:stdp}, and
{cmd:stddp} and specify either one or k new variables with {cmd:p}.
{p_end}

{p 4 4 2}
These statistics are available both in and out of sample; type
"{cmd:predict} {it:...} {cmd:if e(sample)} {it:...}" if wanted only for the
estimation sample.
{p_end}


{title:Description}

{p 4 4 2}
{cmd:regoprob2} is a user-rewritten program that estimates panel data generalized
ordered probit models with random effects. The actual values taken on by the
dependent variable are irrelevant except that larger values are assumed to
correspond to "higher" outcomes. The generalized model relaxes the
{it:parallel regression} assumption of standard ordered probit models;
see help {help oprobit} and its random effects counterpart {help reoprob}.
{cmd:regoprob2} modifies Stefan Boes´ regoprob ({help regoprob}) program and is backward 
compatible with it but offers {cmd: one} additional powerful option, namely the {cmd: autofit} option.


{p 4 4 2}
{cmd:regoprob2} supports linear constraints and allows the user to partially
relax the parallel regression assumption by specifying variables in {cmd:npl()}
or {cmd:pl()}. The likelihood contribution for each unit is approximated using
Gauss-Hermite quadrature. 

{p 4 4 2}
{cmd:regoprob2} requires installation of the
{cmd:regoprob}, {cmd:goprobit} and the {cmd:ghquadm} commands. The {cmd:autofit}
option greatly simplifies the process of identifying partial proportional odds 
models that fit the data.
{p_end}



{title:Options}

{p 4 8 2}{cmd:i()} specifies the variable corresponding to an independent unit
(e.g., a subject id).  {cmd:i(}{it:varname}{cmd:)} is not optional.
{p_end}

{p 4 8 2}
{cmd:quadrat()} specifies the number of points to use for the Gauss-Hermite
quadrature. It is optional, and the default is 12. Increasing this value
improves accuracy, but also increases computation time.
{p_end}

{p 4 8 2}
{cmd:pl}, {cmd:npl}, {cmd:npl()}, {cmd:pl()}, {cmd:autofit}
and {cmd:autofit2()} provide alternative means for imposing or relaxing
the proportional odds/ parallel lines assumption. Only one may be
specified at a time.
{p_end}

{p 8 12 2}
If {cmd:autofit} is selected, the standard significance level is 0.05 and an 
iterative process is used to identify the partial proportional odds model that 
best fits the data.
{p_end}

{p 8 12 2} With {cmd:autofit2(}{it:alpha}{cmd:)} one can choose another significance 
level than the standard one. {it:alpha} is the desired significance level for the tests; 
{it:alpha} must be greater than 0 and less than 1.  If {cmd:autofit} is specified
without parameters, the default alpha-value is .05. Note that, the higher {it:alpha} 
is, the easier it is to reject the parallel lines assumption, and the less parsimonious 
the model will tend to be. This option can take a little while because several models 
may need to be estimated.  The use of {cmd:autofit} is highly recommended but the other
options provide more control over the final model if the user wants it.

{p 8 12 2}
{cmd:pl} specified without parameters constrains all independent
variables to meet the parallel regression assumption.  It will produce
results that are equivalent to {cmd:oprobit}.
{p_end}
{p 8 12 2}
{cmd:npl} specified without parameters relaxes the parallel
regression assumption for all explanatory variables. This is the default
option.
{p_end}

{p 8 12 2}
{cmd:pl(}{it:varlist}{cmd:)} constrains the specified explanatory
variables to meet the parallel regression assumption. All other variables
do not need to meet the assumption. The variables specified must be a subset
of the explanatory variables.
{p_end}

{p 8 12 2}
{cmd:npl(}{it:varlist}{cmd:)} frees the specified explanatory
variables from meeting the parallel regression assumption. All other
explanatory variables are constrained to meet the assumption. The variables
specified must be a subset of the explanatory variables.
{p_end}

{p 4 8 2}
{cmd:constraints(}{it:clist}{cmd:)} specifies the linear
constraints to be applied during estimation.  The default is to perform
unconstrained estimation.  Constraints are defined with the
{help constraint} command. {cmd:constraints(1)} specifies that the
model is to be constrained according to constraint 1;
{cmd:constraints(1-4)} specifies constraints 1 through 4;
{cmd:constraints(1-4,8)} specifies 1 through 4 and 8.  Keep in mind that the
{cmd:pl}, and {cmd:npl} options work by generating across-equation
constraints, which may affect how any additional constraints should be
specified.  When using the {cmd: constraint} command, refer to equations
by their equation #, e.g. #1, #2, etc.
{p_end}

{p 4 8 2}
{cmd:level(}{it:#}{cmd:)} specifies the confidence level in percent for
the confidence intervals of the coefficients; see help {help level}.
{p_end}


{p 4 8 2}
{it:maximize_options} control the maximization process; see
help {help maximize}. You should never have to specify them.
{p_end}


{title:Options for {help predict}}

{p 4 8 2}
{cmd:p}, the default, calculates predicted probabilities {it: marginal} on the
individual effect.
{p_end}

{p 8 8 2}
If you do not specify the {cmd:outcome()} option, you must specify k new
variables. For instance, say you fitted your model by typing
"{cmd:regoprob2 happy income health, i(persnr)}" and that {cmd:happy} takes on three values.
Then you could type "{cmd:predict p1 p2 p3, p}" to obtain all three predicted
probabilities.
{p_end}

{p 8 8 2}
If you also specify the {cmd:outcome()} option, then you specify one new
variable. Say that {hi:happy} took on values 1, 2, and 3. Then typing
"{cmd:predict p1, p outcome(1)}" would produce the same {hi:p1} as above,
"{cmd:predict p2, p outcome(2)}" the same {hi:p2} as above, etc. If {hi:happy}
took on values 7, 22, and 93, you would specify {cmd:outcome(7)},
{cmd:outcome(22)}, and {cmd:outcome(93)}. Alternatively, you could specify the
outcomes by referring to the equation number ({cmd:outcome(#1)},
{cmd:outcome(#2)}, and {cmd:outcome(#3)}.
{p_end}

{p 4 8 2}
{cmd:xb} calculates the linear prediction. You must also specify the
{cmd:outcome()} option.
{p_end}

{p 4 8 2}
{cmd:stdp} calculates the standard error of the linear prediction. You must
specify option {cmd:outcome()}.
{p_end}

{p 4 8 2}
{cmd:stddp} calculates the standard error of the difference in two linear
predictions. You must specify option {cmd:outcome()}, in this case with two
particular outcomes of interest inside the parentheses; for example,
"{cmd:predict sed, stdp outcome(1,3)}".
{p_end}

{p 4 8 2}
{cmd:outcome()} specifies for which outcome the statistic is to be calculated.
{cmd:equation()} is a synonym for {cmd:outcome()}: it does not matter which one
you use. {cmd:outcome()} and {cmd:equation()} can be specified using (1)
{cmd:#1}, {cmd:#2}, ..., with {cmd:#1} meaning the first category of the
dependent variable, {cmd:#2} the second category, etc.; or (2) values of the
dependent variable.
{p_end}


{title:Remarks and Methods}

{p 4 4 2}
For further details see {cmd: regoprob} ({help regoprob}). {cmd:regoprob2} uses, as {cmd:regoprob} 
the d1 method (analytic first derviatives) of Stata's {cmd:ml} commands.
{p_end}


{title:Examples}

{p 8 12 2}
{cmd:. regoprob2 satisfaction age children unemployment blue_collar, i(id)}{p_end}

{p 8 12 2} 
{cmd:. regoprob2 satisfaction age children unemployment blue_collar, i(id) autofit}{p_end}

{p 8 12 2} 
{cmd:. regoprob2 satisfaction age children unemployment blue_collar, i(id) autofit2(0.1)}{p_end}

{p 8 12 2}
{cmd:. predict xb1, xb outcome(#1)}
{p_end}



{title:Author}
-------------------------------------------------

{p 5 5}
Christian Pfarr{break}
University of Bayreuth{break}
christian.pfarr@uni-bayreuth.de{break}
{browse "http://www.fiwi.uni-bayreuth.de"}
{p_end}

{p 5 5}
Andreas Schmid{break}
University of Bayreuth{break}
andreas.schmid@uni-bayreuth.de{break}
{p_end}

{p 5 5}and

{p 5 5}
Udo Schneider {break}
University of Bayreuth {break}
udo.schneider@uni-bayreuth.de {break}
--------------------------------------------


{title:Acknowledgements}

{p 5 5}
Stefan Boes of the University of Zurich wrote {cmd:regoprob} and kindly gave us the permission
to use parts of his code for {cmd:regoprob2}. See {help regoprob} for a description of the former
{cmd:regoprob} command.
{p_end}

{p 5 5}
Richard Williams of the Notre Dame Department of Sociology wrote {cmd:gologit2}
and kindly gave me permission to use parts of his code for programming {cmd:goprobit}.
For a more detailed description of {cmd:gologit2} and its features, see the reference
below or {help gologit2}.
{p_end}

{p 5 5}
{cmd:reoprob2} is a user-rewritten program of {cmd:regoprob} and combines the features of {cmd:gologit2} and {cmd:regoprob}, 
i.e., estimates panel data generalized ordered probit models with the additional option of autofitting the model.
{p_end}



{title:References}

{p 5 5}
Pfarr, C., Schmid, A. and Schneider, U. (2010). "regoprob2: An extension of estimating
random effects generalized ordered probit models." Working Paper No. xx, University Bayreuth.
{p_end}

{p 5 5}
Boes, S. and R. Winkelmann (2006) "The Effect of Income on Positive and Negative
Subjective Well-Being." unpublished manuscript.
{p_end}

{p 5 5}
Butler, J.S. and  R. Moffitt (1982) "A computationally efficient quadrature
procedure for the one-factor multinomial probit model." Econometrica 50: 761-764.
{p_end}

{p 5 5}
Williams, Richard (2006) "Generalized Ordered Logit/ Partial Proportional Odds
Models for Ordinal Dependent Variables." The Stata Journal 6(1): 58-82. A pre-publication
version is available at {browse "http://www.nd.edu/~rwilliam/gologit2/gologit2.pdf"}.
{p_end}


{title:Also see}

{p 4 13 2}
Manual:
{hi:[U] 23 Estimation and post-estimation commands},{break}
{hi:[U] 29 Overview of Stata estimation commands}
{p_end}

{p 4 13 2} Online:  help for {help regoprob}, {help estcom}, {help postest}, {help constraint},
{help oprobit}, {help goprobit}, {help ologit}, {help gologit}, {help gologit2},
{help reoprob}
{p_end}
