Description Usage Arguments Details Value Note Author(s) References See Also Examples

Fitting a model with a censored dependent variable.

1 2 3 4 5 |

`formula` |
an object of class |

`left` |
left limit for the censored dependent variable;
if set to |

`right` |
right limit for the censored dependent variable;
if set to |

`data` |
an optional data frame.
If argument |

`start` |
an optional vector of initial parameters for the ML estimation
(intercept, slope parameters, logarithm of the standard deviation
of the individual effects (only for random-effects panel data models),
and logarithm of the standard deviation of the general disturbance term);
if |

`nGHQ` |
number of points used in the Gauss-Hermite quadrature, which is used to compute the log-likelihood value in case of the random effects model for panel data. |

`logLikOnly` |
logical. If |

`x` |
object of class |

`logSigma` |
logical value indicating whether the variance(s)
of the model should be printed logarithmized
(see |

`digits` |
positive integer specifiying the minimum number of
significant digits to be printed
(see |

`...` |
additional arguments for |

The model is estimated by Maximum Likelihood (ML)
assuming a Gaussian (normal) distribution of the error term.
The maximization of the likelihood function is done
by function `maxLik`

of the maxLik package.
An additional argument `method`

can be used to specify
the optimization method used by `maxLik`

,
e.g.\ `"Newton-Raphson"`

, `"BHHH"`

, `"BFGS"`

,
`"SANN"`

(for simulated annealing), or
`"NM"`

(for Nelder-Mead).

If argument `logLikOnly`

is `FALSE`

(default),
`censReg`

returns an object of class `"censReg"`

inheriting from class `"maxLik"`

.
The returned object contains the same components as objects
returned by `maxLik`

and additionally
the following components:

`call` |
the matched call. |

`terms` |
the model terms. |

`nObs` |
a vector containing 4 integer values: the total number of observations, the number of left-censored observations, the number of uncensored observations, and the number of right-censored observations. |

`df.residual` |
degrees of freedom of the residuals. |

`start` |
vector of starting values. |

`left` |
left limit of the censored dependent variable. |

`right` |
right limit of the censored dependent variable. |

`xMean` |
vector of mean values of the explanatory variables. |

In contrast,
if argument `logLikOnly`

is `TRUE`

,
`censReg`

returns a vector
of the log-likelihood contributions of all observations/individuals.
This vector has an attribute `"gradient"`

,
which is a matrix containing the gradients of the log-likelihood contributions
with respect to the parameters.

When the censored regression model is estimated,
the log-likelihood function is maximized with respect
to the coefficients and the *logarithm(s)*
of the variance(s).

Arne Henningsen

Greene, W.H. (2008):
*Econometric Analysis*, Sixth Edition, Prentice Hall, p. 871-875.

Kleiber, C. and Zeileis, A. (2008):
*Applied Econometrics with R*, Springer, p. 141-143.

Tobin, J. (1958):
Estimation of Relationships for Limited Dependent Variables.
*Econometrica* 26, p. 24-36.

`summary.censReg`

, `coef.censReg`

,
`tobit`

, `selection`

1 2 3 4 5 6 7 8 9 10 | ```
## Kleiber & Zeileis ( 2008 ), page 142
data( "Affairs", package = "AER" )
estResult <- censReg( affairs ~ age + yearsmarried + religiousness +
occupation + rating, data = Affairs )
print( estResult )
## Kleiber & Zeileis ( 2008 ), page 143
estResultBoth <- censReg( affairs ~ age + yearsmarried + religiousness +
occupation + rating, data = Affairs, right = 4 )
print( estResultBoth )
``` |

```
Loading required package: maxLik
Loading required package: miscTools
Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
Please cite the 'censReg' package as:
Henningsen, Arne (2017). censReg: Censored Regression (Tobit) Models. R package version 0.5. http://CRAN.R-Project.org/package=censReg.
If you have questions, suggestions, or comments regarding the 'censReg' package, please use a forum or 'tracker' at the R-Forge site of the 'sampleSelection' project:
https://r-forge.r-project.org/projects/sampleselection/
Call:
censReg(formula = affairs ~ age + yearsmarried + religiousness +
occupation + rating, data = Affairs)
Coefficients:
(Intercept) age yearsmarried religiousness occupation
8.1742 -0.1793 0.5541 -1.6862 0.3261
rating logSigma
-2.2850 2.1099
Warning message:
In censReg(affairs ~ age + yearsmarried + religiousness + occupation + :
at least one value of the endogenous variable is larger than the right limit
Call:
censReg(formula = affairs ~ age + yearsmarried + religiousness +
occupation + rating, right = 4, data = Affairs)
Coefficients:
(Intercept) age yearsmarried religiousness occupation
7.9010 -0.1776 0.5323 -1.6163 0.3242
rating logSigma
-2.2070 2.0723
```

censReg documentation built on May 31, 2017, 1:36 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.