*! version 1.0 01nov2013

Title

zicen -- Estimates a finite mixture model made of a degenerate distribution with mass at
zero and one or two censored (Tobit) normals.

Syntax

zicen depvar [indepvars] [if] [in], classes(#)[options]

Model main
classes(#) specify the number of classes (2 or 3)

Model probability
probability(varlist) list of covariates to explain mixture probabilities (optional)

Useful (optional) max options
difficult uses a different stepping algorithm in non-concave regions

init(values, copy) initial values for the coefficients (use with zicen0 rather than zicen)

by is not allowed; see [R] maximize for more maximization options.

fweights are currently not allowed/tested.

Description

zicen, for zero-inflated censored normals, estimates a finite mixture model made of a
degenerate distribution with mass at zero and one or two censored (Tobit) normals. In general, the log-likelihood function of finite mixture models is difficult to maximize since it may contain multiple maxima and non-concave regions. The maximization option difficult should be used when the maximization log shows that the optimization algorithm has encountered a non-concave region and fails to converge.

The deffault method for finding starting values has worked in many actual and simulated datasets. For difficult problems and to verify that the algorithm has converged to a global maximum, more than one set of starting values should be used. When supplying starting values, it is more effcient to use the auxiliary command zicen0. zicen0 does not have a programmed algorithm for choosing starting values; otherwise, it is identical to zicen. Without good starting values, it is possible that models will not converge.

Postestimation syntax

predict [type] newvar [if] [in] [, equation(name) posterior prob ystar]

Main
equation(name) specifies for which class to obtain a prediction: eq1 or eq2

posterior calculates the posterior probability of belonging to the class corresponding to equation(name) option. Note that posterior probabilities require that the outcome is observed.

prob calculates the estimated probability of belonging to the class corresponding to equation(name) option. Note that estimated probabilities do not use the outcome variable.

ystar calculates censored predictions for the Tobit components. To obtain predicted values of the latent outcome, use only option equation.

Note: If no option is specified, the prediction corresponds to the weighted expected value (sum of mean predictions by class weighted by estimated mixture
probabilities).

Syntax for postestimation command zicenlc

zicenlc newvar [if] [in] [, class prediction]

Main
class based on the highest posterior probability, assings each observation to a class

prediction calculates censored predicted values conditional on posterior class membership

zicenlc

zicenlc is provided for convenience as it calculates postestimation predictions and classifications that can be
done using predict and additional coding. zicenlc classifies observations into classes using the highest posterior
probability of class membership. It also provides censored predictions conditional on class membership. zicenlc requieres the outcome variable to calculate posterior probabilities.

Syntax for postestimation command zicenec

zicenec newvar [if] [in] [, class prediction]

Main
class based on the highest estimated probability, assigns each observation to a class

prediction calculates censored predicted values conditional on estimated class membership

zicenec

zicenec is similar to zicenlc but instead of using posterior probabilities to classify observations into classes it uses the estimated probabilities. zicenec does not use the outcome to calculate predicted mixture probabilities. For models with constant mixture probabilities (i.e. models with no covariates explaining the mixture probabilities), all observations are classified into one class. zicenec is intented to be used after estimating models with non-constant mixture probabilities. If covariates do not produce enough variability in the mixture probabilities, all observations may be classified into the same class.

Options for zicen

Main

classes(#) Can be either 2 or 3. If 2, a mixture model of a degenerate distribution with mass at zero and a censored
normal is estimated. If 3, another censored normal class is assumed.

probability(varlist) specifies a list of predictors for the mixture probabilities. It accepts factor variable
syntax.

Remarks

For details about zicen and some of its applications, see Marcelo Coca Perraillon M,Tina Shih, and Ronald Thisted (2014). Predicting the EQ-5D Preference Index from the SF-12 Health Survey: A Finite Mixture Approach (citation forthcoming).

Examples

. ssc desc zicen

. net get zicen

. use simudata.dta

. zicen ymixed3c age, cl(3)

. zicen ymixed3c age, prob(age) cl(3) diff

. predict probpost1, pos eq(eq1)

. predict probpost2, pos eq(eq2)

. gen probpost0 = 1-probpost1-probpost2

. predict pec1, eq(eq1) prob

. predict pec2, eq(eq2) prob

. gen pec0 = 1 - pec1 - pec2

. sum probpost* pec*

. predict yhat1, eq(eq1)

. predict yhat1c, eq(eq1) ystar

. sum yhat1 yhat1c

. zicenlc yhat_class, pre

. zicenlc pred_class, cla

. zicenec yhat_class_ec, pred

. zicenec pred_class_ec, cla

. sum yhat_class yhat_class_ec

. tab pred_class pred_class_ec, row

. zicen ymixed3c age, cl(3) prob(age)

. zicen ymixed3c age, cl(3) prob(age) diff technique(nr dfp bfgs)

. zicen0 ymixed3c, cl(3) init(2.2 14.1 -.60 -.62 .23 1.6,copy) search(off)