Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: double-hurdle models


From   "Stephen P. Jenkins" <[email protected]>
To   <[email protected]>
Subject   st: double-hurdle models
Date   Tue, 23 Aug 2005 09:10:20 +0100

> ------------------------------
> 
> Date: Mon, 22 Aug 2005 16:07:22 +0000
> From: "Chris Thomas" <[email protected]>
> 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 
> immediately 
> 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 
> `p1'=(($ML_y1+(1-`d'))^(`l'-1))*`p'*normd(`z')/`theta2'
> quietly replace `lnf'=ln((1-`d')*`p0'+`d'*`p1')
> end
> 
> 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).
> 
> Thanks
> 
> Chris

It is usually advisable to see if people have travelled these roads
before.
 
A search of Statalist archives on "double hurdle" reveals a relevant
message at
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
hurdle-)

SJ-3-2  st0040  . . . . . . . . . . . . . . From the help desk:  hurdle
models
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  A.
McDowell
        Q2/03   SJ 3(2):178--184                                 (no
commands)
        demonstrates how the parameters of a hurdle model can be
        estimated in Stata using a combination of existing commands


Stephen
-------------------------------------------------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.
http://www.iser.essex.ac.uk  
Survival Analysis using Stata:
http://www.iser.essex.ac.uk/teaching/degree/stephenj/ec968/ 



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index