Title: | Bias-Reduced Tobit Regression |
---|---|
Description: | Tobit models are regression models with a Gaussian response variable left-censored at zero, constant latent variance, and a latent mean that depends on covariates through a linear predictor. As an alternative to plain maximum likelihood estimation, the adjusted score equations of Kosmidis and Firth (2010) <doi:10.1214/10-ejs579> are utilized to obtain bias-reduced estimates of the model parameters. |
Authors: | Achim Zeileis [aut, cre] , Ioannis Kosmidis [aut] , Susanne Koell [aut], Christian Kleiber [ctb] |
Maintainer: | Achim Zeileis <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 0.1-2 |
Built: | 2024-11-20 05:51:03 UTC |
Source: | https://github.com/r-forge/topmodels |
Fitting tobit regression models with bias-reduced estimation (rather than plain maximum likelihood).
brtobit(formula, data, subset, na.action, model = TRUE, y = TRUE, x = FALSE, control = brtobit_control(...), ...) brtobit_fit(x, y, control = brtobit_control()) brtobit_control(fsmaxit = 100, start = NULL, epsilon = 1e-08, type = "BR", ...)
brtobit(formula, data, subset, na.action, model = TRUE, y = TRUE, x = FALSE, control = brtobit_control(...), ...) brtobit_fit(x, y, control = brtobit_control()) brtobit_control(fsmaxit = 100, start = NULL, epsilon = 1e-08, type = "BR", ...)
formula |
a formula expression of the form |
data |
an optional data frame containing the variables occurring in the formulas. |
subset |
an optional vector specifying a subset of observations to be used for fitting. |
na.action |
a function which indicates what should happen when the data
contain |
model |
logical. If |
x , y
|
for |
... |
arguments to be used to form the default |
control , fsmaxit , start , epsilon
|
a list of control parameters passed for the Fisher scoring optimization. |
type |
character. Should bias-reduced (BR) or plain maximum likelihood (ML) estimation be used? |
brtobit
fits tobit regression models with bias-reduced (BR) estimation
as introduced by Köll et al. (2021). The model assumes an underlying latent Gaussian variable:
which is only observed if positive and zero otherwise: .
The latent mean
is linked to a linear predictor
and the latent variance is assumed to be constant.
brtobit_fit
is the lower level function where the actual fitting takes place.
A set of standard extractor functions for fitted model objects is available for
objects of class "brtobit"
, including methods to the generic functions
print
, summary
, coef
,
vcov
, logLik
, predict
,
model.frame
, model.matrix
,
bread
(from the sandwich package),
getSummary
(from the memisc package, enabling mtable
), and
prodist
(from the distributions3 package, enabling
various methods and graphics from the topmodels packages).
In the future we intend to extend the implementation to heteroscedastic tobit
models in the crch
package (Messner, Mayr, Zeileis 2016).
brtobit
returns an object of class "brtobit"
, i.e., a list with components as follows.
brtobit_fit
returns an unclassed list with components up to converged
.
coefficients |
vector of estimated regression coefficients (plus the variance), |
bias |
bias estimate, |
vcov |
covariance matrix of all parameters in the model, |
loglik |
the log-likelihood of the fitted model, |
df |
number of estimated parameters, |
nobs |
number of observations, |
grad |
gradient vector, |
control |
list of control parameters, |
iterations |
number of iterations, |
converged |
logical indicating whether the Fisher scoring optimization converged, |
call |
the original function call, |
formula |
the original formula, |
terms |
terms objects for the model, |
levels |
levels of the categorical regressors, |
contrasts |
contrasts corresponding to |
model |
the full model frame (if |
y |
the numeric response vector (if |
x |
model matrix (if |
Köll S, Kosmidis I, Kleiber C, Zeileis A (2021). “Bias Reduction as a Remedy to the Consequences of Infinite Estimates in Poisson and Tobit Regression.” arXiv:2101.07141, arXiv.org E-Print Archive. https://arxiv.org/abs/2101.07141
Messner JW, Mayr GJ, Zeileis A (2016). Heteroscedastic Censored and Truncated Regression with crch. The R Journal, 8(1), 173–181. https://journal.R-project.org/archive/2016-1/messner-mayr-zeileis.pdf.
## artificial data generating process from Koell et al. (2021) dgp <- function(n = 100, coef = c(1, 1, -10, 2), prob = 0.25) { x2 <- runif(n, -1, 1) x3 <- rbinom(n, size = 1, prob = ifelse(x2 > 0, prob, 1 - prob)) y <- rnorm(n, mean = coef[1] + coef[2] * x2 + coef[3] * x3, sd = sqrt(coef[4])) y[y <= 0] <- 0 data.frame(y, x2, x3) } set.seed(2020-10-29) d <- dgp() ## models m22_ml <- brtobit(y ~ x2 + x3, data = d, type = "ML", fsmaxit = 28) m22_br <- brtobit(y ~ x2 + x3, data = d, type = "BR") m2_all <- brtobit(y ~ x2, data = d, type = "ML") m2_sub <- update(m2_all, subset = x3 == 0) if(require("memisc")) { ## Table 2 mtable("ML" = m22_ml, "BR" = m22_br, "ML/sub" = m2_sub, "ML/SST" = m2_all, summary.stats = c("Log-likelihood", "N")) }
## artificial data generating process from Koell et al. (2021) dgp <- function(n = 100, coef = c(1, 1, -10, 2), prob = 0.25) { x2 <- runif(n, -1, 1) x3 <- rbinom(n, size = 1, prob = ifelse(x2 > 0, prob, 1 - prob)) y <- rnorm(n, mean = coef[1] + coef[2] * x2 + coef[3] * x3, sd = sqrt(coef[4])) y[y <= 0] <- 0 data.frame(y, x2, x3) } set.seed(2020-10-29) d <- dgp() ## models m22_ml <- brtobit(y ~ x2 + x3, data = d, type = "ML", fsmaxit = 28) m22_br <- brtobit(y ~ x2 + x3, data = d, type = "BR") m2_all <- brtobit(y ~ x2, data = d, type = "ML") m2_sub <- update(m2_all, subset = x3 == 0) if(require("memisc")) { ## Table 2 mtable("ML" = m22_ml, "BR" = m22_br, "ML/sub" = m2_sub, "ML/SST" = m2_all, summary.stats = c("Log-likelihood", "N")) }