Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: metrics
See also: glmest

Quantlet: tobit
Description: 2-step estimation of a Tobit model

Reference(s):

Usage: {b,s,cv} = tobit(x,y)
Input:
x n x d matrix , the observed explanatory variable
y n x 1 matrix , the observed response variable
Output:
b d x 1 vector, contains the estimated coefficients of the components of x
s scalar, contains the estimated standard deviation of the error term
cv (d+1)x(d+1) matrix, estimated covariance matrix for [b,s]

Example:
library("metrics")
n	=	500
k	=	2
x	=	matrix(n)~aseq(1, n ,0.25)
s	=	8
u	=	s*normal(n)
b	=	#(-9, 1)
ystar	=	x*b+u
y	=	ystar.*(ystar.>=0)
tstep	= 	tobit(x,y)
tstep.b
tstep.s
tstep.cv
dg	=	matrix(rows(tstep.cv),1)
dig	=	diag(dg)
stm	=	dig.*tstep.cv
std	=	sqrt(sum(stm,2))
coef	=	tstep.b|tstep.s
coef~(coef./std)	; t-ratios

Result:
2-step estimates of b and s



Author: A. Werwartz, 19960605
(C) MD*TECH Method and Data Technologies, 05.02.2006