tcensReg: Regression Method for Truncated Normal Distribution with...

Description Usage Arguments Details Value References Examples

View source: R/tcensReg.R

Description

This function is used to find estimates from a linear equation assuming that the underlying distribution is truncated normal and the data has subsequently been censored data.

Usage

1
2
3
4
5
6
7
8
tcensReg(
  formula,
  a = -Inf,
  v = NULL,
  data = sys.frame(sys.parent()),
  method = c("CG", "Newton", "BFGS"),
  ...
)

Arguments

formula

Object of class formula which symbolically describes the model to be fit

a

Numeric scalar indicating the truncation value. Initial value is -Inf indicating no truncation

v

Numeric scalar indicating the censoring value. Initially set to NULL indicating no censoring

data

Data.frame that contains the outcome and corresponding covariates. If none is provided then assumes objects are in user's environment.

method

Character value indicating which optimization routine to perform. Choices include Newton, BFGS, and CG. See details for explanation on each method.

...

Additional arguments from such as max_iter, step_max, or epsilon. See details for how to define these additional arguments.

Details

This estimation procedure returns maximum likelihood estimates under the presence of left truncation and/or left censoring. It builds upon currently available methods for limited dependent variables by relaxing the assumption of a latent normal distribution and instead allows the this underlying distribution to potentially be a latent truncated normal distribution.

To indicate left censoring the user should specify the parameter v, and to indicate left truncation specify the parameter a. If specifying both left censoring and left truncation note that there is an implicit restriction that a<ν.

Below is a brief description of the types of distributions that can be fit along with the assumed data generating process for the observed outcome, Y.

Latent Distributions

The tcensReg function allows user to specify one of four combinations of distributional assumptions with or without censoring. These are listed below along with the necessary arguments needed to fit this model.

Truncated Normal with Censoring

This is the main model that this package is designed to fit and introduced in \insertCitewilliams2019modelingtcensReg.It assumes

Y_{i}^{*}\sim TN(μ, σ^{2}, a)

where TN indicates a left truncated normal random variable, truncated at the value a.

This underlying truncated normal random variable is then left censored at the value ν to create the censored observations Y such that

Y_{i}=ν 1_{\{Y_{i}^{*}≤ν\}} + Y_{i}^{*} 1_{\{Y_{i}^{*}>ν}\}

Required Arguments:

Normal with Censoring

This model is commonly referred to as the Tobit model \insertCitetobin1958estimationtcensReg. This model assumes that the data is generated from a latent normal random variable Y_{i}^{*}, i.e.,

Y_{i}^{*}\sim N(μ, σ^{2})

This underlying normal random variable is then left censored at the value ν to create the censored observations Y such that

Y_{i}=ν 1_{\{Y_{i}^{*}≤ν\}} + Y_{i}^{*} 1_{\{Y_{i}^{*}>ν}\}

Required Arguments:

This procedure can also be fit using the censReg package by \insertCitehenningsen2010estimating;textualtcensReg.

Truncated Normal

This model assumes that there is no censored observations, but that the data are left truncated as originally described by \insertCitehald1949maximum;textualtcensReg.

Therefore, we assume that the observed values follow

Y_{i}^\sim TN(μ, σ^{2}, a)

where TN indicates a left truncated normal random variable, truncated at the value a.

Required Arguments:

This procedure can also be fit using the truncreg package by \insertCitecroissant2018truncreg;textualtcensReg.

Normal

This model assumes that there is no left censoring and no left truncation.

Maximum likelihood estimates are returned based on the assumption that the random variable follows the distribution

Y_{i}^\sim N(μ, σ^{2})

Required Arguments: None

This procedure can also be fit using the command lm in base R.

Optimization Methods

Currently available optimization routines include conjugate gradient (CG), Newton-Raphson (Newton), and BFGS (BFGS). The default method is set as the conjugate gradient. Both the of the conjugate gradient and BFGS methods are implemented via the general-purpose optimization routine optim. These two methods use only the respective likelihood and gradient functions. The Newton-Raphson method uses the likelihood, gradient, and Hessian functions along with line search to achieve the maximum likelihood.

Additional Arguments

There are additional arguments that the user may provide for controlling the optimization routine.

Value

Returns a list of final estimate of theta, total number of iterations performed, initial log-likelihood, final log-likelihood, estimated variance covariance matrix, information criterion, model design matrix, call, list of total observations and censored observations, and latent distributional assumption.

References

\insertAllCited

Examples

1
2
3
4
5
6
7
8
9
#truncated normal underlying data
y_star <- rtnorm(n = 1000, mu = 0.5, sd = 1, a = 0)

#apply censoring
y <- ifelse(y_star <= 0.25, 0.25, y_star)

#find MLE estimates
trunc_cens_mod <- tcensReg(y ~ 1, v = 0.25, a = 0)
summary(trunc_cens_mod)

tcensReg documentation built on July 8, 2020, 7:17 p.m.