On Sat, 6 Jul 2013, ROGER MCNEILL wrote:
According to the gretl test for normality of residuals in my
estimated
Tobit model, heteroscedasticity is a problem, meaning the Tobit
estimator is inconsistent. Does gretl have an alternative estimator for
censored regressions such as a least absolute deviations estimator or an
maximum likelihood estimator that is consistent in the face of non
normal errors?
Not pre-cooked. However, if you have a specific alternative in mind, it
shouldn't be difficult to code it in hansl. The following example uses
data from Marno Verbeek's textbook to estimate a simple heteroskedastic
Tobit model via mle:
<hansl>
function series het_tobit_ll(series y, list X, list Z, matrix param)
scalar kx = nelem(X)
list Z -= const # remove constant if present for identification
scalar kz = nelem(Z)
series ndx_m = lincomb(X, param[1:kx])
series l_h = param[kx+1]
if kz > 0
matrix gamma = param[kx+2:kx+kz+1]
series l_h += lincomb(Z, gamma)
endif
series u = (y - ndx_m)/exp(l_h)
series ll = (y > 0) ? -0.5*(ln(2*$pi) + 2*l_h + u^2) : \
ln(cnorm(u))
return ll
end function
# -----------------------------------------------------------
open tobacco.gdt
series alcohol = misszero(w1)
list X = const age nadults nkids nkids2 lnx agelnx nadlnx
tobit alcohol X
matrix theta = $coeff | ln($sigma)
list Z = nkids lnx
theta |= zeros(nelem(Z), 1)
set warnings off
mle ll = het_tobit_ll(alcohol, X, Z, theta)
params theta
end mle -h
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------