**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.

See **intreg** for a recommended alternative to **cnreg**.

__Title__

**[R] cnreg** -- Censored-normal regression

__Syntax__

__cnr__**eg** *depvar* [*indepvars*] [*if*] [*in*] [*weight*] **,** __cen__**sored(***varname***)**
[*options*]

*options* Description
-------------------------------------------------------------------------
Model
* __cen__**sored(***varname***)** variable indicating whether *depvar* is not censored
(0), left censored (-1), or right censored (1)
__off__**set(***varname***)** include *varname* in model with coefficient
constrained to 1

SE/Robust
**vce(***vcetype***)** *vcetype* may be **oim**, __r__**obust**, __cl__**uster** *clustvar*,
__boot__**strap**, or __jack__**knife**

Reporting
__l__**evel(***#***)** 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.
**aweight**s are not allowed with the **jackknife** prefix.
**vce()** and weights are not allowed with the **svy** prefix.
**aweight**s, **fweight**s, **pweight**s, and **iweight**s 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 (**oim**, **opg**),
that are robust to some kinds of misspecification (**robust**), that
allow for intragroup correlation (**cluster** *clustvar*), and that use
bootstrap or jackknife methods (**bootstrap**, **jackknife**); see **[R]**
*vce_option*.

+-----------+
----+ Reporting +--------------------------------------------------------

**level(***#***)**; see **[R] estimation options**.

+-------------+
----+ Max options +------------------------------------------------------

*maximize_options*: __iter__**ate(***#***)**, [__no__]__lo__**g**, __tr__**ace**, __tol__**erance(***#***)**,
__ltol__**erance(***#***)**, __nrtol__**erance(***#***)**, __nonrtol__**erance**; 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(p)** p-value for chi-squared test
**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**