truncreg {truncreg}R Documentation

Models for truncated regressions

Description

Estimation of models with truncated explanatory variables by maximum likelihood

Usage

truncreg(formula, data, subset, weights, na.action,
       point = 0, direction = "left", ...)
## S3 method for class 'truncreg'
print(x, digits = max(3, getOption("digits") - 2),
    width = getOption("width"), ...)
## S3 method for class 'truncreg'
summary(object, ...)
## S3 method for class 'summary.truncreg'
print(x, digits = max(3, getOption("digits") - 2),
    width = getOption("width"), ...)
## S3 method for class 'truncreg'
logLik(object, ...)
## S3 method for class 'truncreg'
vcov(object, ...)
## S3 method for class 'truncreg'
residuals(object, ...)
## S3 method for class 'truncreg'
fitted(object, ...)

Arguments

x, object

an object of class truncreg

formula

a symbolic description of the model to be estimated,

data

the data,

subset

an optional vector specifying a subset of observations,

weights

an optional vector of weights,

na.action

a function which indicates what should happen when the data contains 'NA's,

point

the value of truncation (the default is 0),

direction

the direction of the truncation, either "left" (the default) or "right",

digits

the number of digits,

width

the width of the printing,

...

further arguments.

Details

The model is estimated with the maxLik package and the Newton-Raphson method, using analytic gradient and hessian.

Value

An object of class "truncreg", a list with elements:

coefficients

the named vector of coefficients,

vcov

the variance matrix of the coefficients,

fitted.values

the fitted values,

logLik

the value of the log-likelihood,

gradient

the gradient of the log-likelihood at convergence,

model

the model frame used,

call

the matched call,

est.stat

some information about the estimation (time used, optimisation method),

Author(s)

Yves Croissant

References

Hausman, J.A. and D.A. Wise (1976) “The evaluation of results from truncated samples: the New-Jersey negative invome tax experiment”, Annals of Economic ans Social Measurment, 5, pp.421–45.

Hausman, J.A. and D.A. Wise (1976) “Social experimentation, truncated distributions and efficient estimation”, Econometrica, 45, pp.421–5.

Examples


## Simulate a data.frame
n <- 10000
sigma <- 4
alpha <- 2
beta <- 1
x <- rnorm(n,0,2)
eps <- rnorm(n)
y <- alpha+beta*x+eps*sigma
d <- data.frame(y = y, x = x)

## Use a truncated subsample
dl1 <- subset(d, y>1)

## Use truncreg to estimate consistently the model

truncreg(y~x, dl1, point = 1, direction = "left")

[Package truncreg version 0.1-1 Index]