help cnreg dialogs: cnreg svy: cnreg
also see: cnreg postestimation
previously documented
-------------------------------------------------------------------------------
cnreg continues to work but, as of Stata 11, is no longer an official
part of Stata. This is the original help file, which we will no longer
update, so some links may no longer work.
Title
[R] cnreg -- Censored-normal regression
Syntax
cnreg depvar [indepvars] [if] [in] [weight] , censored(varname)
[options]
options description
-------------------------------------------------------------------------
Model
* censored(varname) variable indicating whether depvar is not censored
(0), left censored (-1), or right censored (1)
offset(varname) include varname in model with coefficient
constrained to 1
SE/Robust
vce(vcetype) vcetype may be oim, robust, cluster clustvar,
bootstrap, or jackknife
Reporting
level(#) set confidence level; default is level(95)
Max options
maximize_options control the maximization process; seldom used
-------------------------------------------------------------------------
* censored(varname) is required.
bootstrap, by, jackknife, nestreg, rolling, statsby, stepwise, svy, and
xi are allowed; see prefix.
Weights are not allowed with the bootstrap prefix.
aweights are not allowed with the jackknife prefix.
vce() and weights are not allowed with the svy prefix.
aweights, fweights, pweights, and iweights are allowed; see weight.
See [R] cnreg postestimation for features available after estimation.
Description
cnreg fits a model of depvar on indepvars, where depvar contains both
observations and censored observations on the process. Censoring values
may vary from observation to observation.
Options
+-------+
----+ Model +------------------------------------------------------------
censored(varname) is required. varname is a variable indicating if
depvar is censored and, if so, whether the censoring is left or
right. 0 indicates that depvar is not censored. -1 indicates left
censoring; the true value is known only to be less than or equal to
the value recorded in depvar. +1 indicates right censoring; the true
value is known only to be greater than or equal to the value recorded
in depvar.
offset(varname); see [R] estimation options.
+-----------+
----+ SE/Robust +--------------------------------------------------------
vce(vcetype) specifies the type of standard error reported, which
includes types that are derived from asymptotic theory, that are
robust to some kinds of misspecification, that allow for intragroup
correlation, and that use bootstrap or jackknife methods; see [R]
vce_option.
+-----------+
----+ Reporting +--------------------------------------------------------
level(#); see [R] estimation options.
+-------------+
----+ Max options +------------------------------------------------------
maximize_options: iterate(#), [no]log, trace, tolerance(#),
ltolerance(#), nrtolerance(#), nonrtolerance; see [R] maximize.
These options are seldom used.
Unlike most maximum likelihood commands, cnreg defaults to nolog --
it suppresses the iteration log. log will display the iteration log.
Examples
Setup
. webuse news2
Perform censored-normal regression
. cnreg date lncltn famown, censored(cnsrd)
Replay results, using 99% CI
. cnreg, level(99)
Saved results
cnreg saves the following in e():
Scalars
e(N) number of observations
e(N_unc) number of uncensored observations
e(N_lc) number of left-censored observations
e(N_rc) number of right-censored observations
e(llopt) contents of ll(), if specified
e(ulopt) contents of ul(), if specified
e(k_aux) number of auxiliary parameters
e(df_m) model degrees of freedom
e(df_r) residual degrees of freedom
e(r2_p) pseudo-R-squared
e(ll) log likelihood
e(ll_0) log likelihood, constant-only model
e(N_clust) number of clusters
e(chi2) chi-squared statistic
e(converged) 1 if converged, 0 otherwise
Macros
e(cmd) cnreg
e(cmdline) command as typed
e(depvar) name of dependent variable
e(censored) variable specified in censored()
e(wtype) weight type
e(wexp) weight expression
e(title) title in estimation output
e(clustvar) name of cluster variable
e(offset) offset
e(chi2type) Wald or LR; type of model chi-squared test
e(vce) vcetype specified in vce()
e(vcetype) title used to label Std. Err.
e(crittype) optimization criterion
e(properties) b V
e(predict) program used to implement predict
e(footnote) program used to implement the footnote display
Matrices
e(b) coefficient vector
e(V) variance-covariance matrix of the estimators
Functions
e(sample) marks estimation sample
Also see
Manual: previously documented
Help: [R] cnreg postestimation;
[R] intreg, [R] regress, [R] tobit, [SVY] svy estimation, [XT]
xtintreg, [XT] xttobit