Description Usage Arguments Details Value References Examples
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.
1 2 3 4 5 6 7 8 |
formula |
Object of class |
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 |
... |
Additional arguments from such as |
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.
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.
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:
a
: left truncation value
v
: left censoring value
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:
v
: left censoring value
This procedure can also be fit using the censReg
package by
\insertCitehenningsen2010estimating;textualtcensReg.
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:
a
: left truncation value
This procedure can also be fit using the truncreg
package by
\insertCitecroissant2018truncreg;textualtcensReg.
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.
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.
There are additional arguments that the user may provide for controlling the optimization routine.
max_iter: Maximum number of iterations for optimization routine. Default is 100
step_max: Maximum number of steps when performing line search. Default is 10
epsilon: Numeric value used to define algorithm stops, i.e., when evaluated gradient is less than epsilon. Default is 0.001
tol_val: Tolerance value used to stop the algorithm if the (n+1) and (n) log likelihood is within the tolerance limit.
theta_init: Numeric vector specifying the initial values to use for the estimated parameters β and \log(σ)
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.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.