[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: double-hurdle models
> Date: Mon, 22 Aug 2005 16:07:22 +0000
> From: "Chris Thomas" <email@example.com>
> Subject: st: Double Hurlde Models
> I was wondering whether anyone would be help with a problem
> Im having with
> building Double Hurdle models in stata. I have the following
> code from a
> recently published article but stata says that d is an "ambiguous
> abbreviation". If I change the name of the variable d to dd
> throughout the
> program, then I get a different error message - variable dd not found.
> I was wondering whether there was an obvious mistake that is
> noticable in my work (included below), or whether there is
> some precode that
> I need before the program will function correctly.
> rename loss_only y
> capture program drop dh
> program define dh
> version 6
> args lnf theta1 theta2 theta3 theta4
> tempvar d p z p0 p1 l yt
> quietly gen double `d'=$ML_y1>0
> quietly gen double `p'=normprob(`theta3')
> quietly gen double `l'=`theta4'
> quietly gen double `yt'=($ML_y1^`l'-1)/`l'
> quietly gen double `z'=(`yt'-`theta1')/(`theta2')
> quietly gen double `p0'=1-(`p'*normprob(-`z'))
> quietly gen double
> quietly replace `lnf'=ln((1-`d')*`p0'+`d'*`p1')
> ml model lf dh (y = curr_bal) () (d= gbp) ()
> ml search
> ml maximize
> I have just included curr_bal and gbp as two example
> independents I plan on
> using to predict loss_only (y).
It is usually advisable to see if people have travelled these roads
A search of Statalist archives on "double hurdle" reveals a relevant
http://www.stata.com/statalist/archive/2003-01/msg00737.html which cites
relevant statistical literature, and respondent Julian Fennema refers to
a program for double hurdle estimation that he was developing.
Inspection of his web pages at http://www.sml.hw.ac.uk/somjaf/Stata/
(found using Google) shows downloadable files for the program -dhurdle-.
[I do not know if Julian is a member of Statalist, whether he has
subsequently written an accompanying help file, or developed his
programs further. If he has, -dhurdle- would be a good foundation for a
submission to the Stata Journal.]
Julian's program considers a more general statistical model (allowing
for an estimatible cross-equation correlation) than the hurdle model
discussed by Brian Poi. (Brian's article is easily found using -findit
SJ-3-2 st0040 . . . . . . . . . . . . . . From the help desk: hurdle
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.
Q2/03 SJ 3(2):178--184 (no
demonstrates how the parameters of a hurdle model can be
estimated in Stata using a combination of existing commands
Professor Stephen P. Jenkins <firstname.lastname@example.org>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374. Fax: +44 1206 873151.
Survival Analysis using Stata:
* For searches and help try: