*! version 1.0 31 Maj 2022
cwmglm Postestimation tools for cwmglm

Postestimation commands

cwmglm allows predict and cwmbootstrap.

Description for predict

predict creates a new variable containing group memberships based on the
maximum a posteriori probabilities (MAP). Observations are assigned to mixture components if the posterior probability is maximum.

Syntax for predict

predict varname

Description for cwmbootstrap

predict displays non parametric bootstrap estimates and standard error for the last cwm in memory.

Syntax for cwmbootstrap

cmwbootstrap , [nreps(#)]

Optional
nreps (#) Number of bootstrap replications. Default is 100

cwmbootstrap uses returned results of cwmglm to obtain bootstrap standard errors for the following estimates:

e(b) coefficient vector of the glm

e(p_multi_#) probabilities of a each outcome for the xmultinomial variables .

e(p_binomial) probabilities of a positive outcome for the xbinomial variables

e(lambda) mean of the xpoisson variables

e(mu) mean of the xnorm variables

cwmbootstrap returns the following results:

r(b) inference table for e(b)

r(p_multi) inference table for e(p_multi_#)

r(p_binomial) inference table for e(p_binomial)

r(lambda) inference table for e(lambda)

r(mu) inference table for e(mu)

Examples

Setup

. use students, clear

Mixture of regressions with random covariates, model VVV

. cwmglm weight height heightf, k(2) posterior(z) xnormal(height heightf) vvv

Predict MAP

. predict cluster

Bootstrap

. cwmbootstrap, nreps(1000)

Authors

Daniele Spinelli, corresponding author (University of Milano-Bicocca, daniele.spinelli@unimib.it)

Salvatore Ingrassia (University of Catania, s.ingrassia@unict.it)

Giorgio Vittadini (University of Milano-Bicocca, giorgio.vittadinid@unimib.it)