st: Simultaneous Tobit Models with ml

Feb 5, 2008 - Y_star = Z*delta + e ... When writing the likelihood function, the term (alpha*Z*delta) ... scalar s_uet = (alpha^2)*s_u^2+s_e^2+2*alpha*s_ue.
38KB taille 21 téléchargements 213 vues
st: Simultaneous Tobit Models with ml

Page 1 sur 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Simultaneous Tobit Models with ml From To Subject Date

"Olivier Paradis-Beland" st: Simultaneous Tobit Models with ml Thu, 27 Nov 2003 12:44:55 -0500

Hi everybody. I want to estimate the following simultaneous Tobit model : H_star = alpha* y + X*beta + u Y_star = Z*delta + e Where H_star and Y_star are latent variables, both observed (i.e. as H and Y) when greater than zero. The difficulty with such a model is obviously that the (endogenous) regressor "y" is a latent variable. We denote "s_u", "s_e" and "s_eu" as the elements of the covariance matrix between error terms. There is indeed for regime in the model (1: H=0 and y=0) (2: H>0 and Y=0) (3: H=0 and Y>0) (4: H>0 and Y>0). Note that we have the following reduced form for H: H= X*beta + e alpha*Z*delta + X*beta + u_et 0

if if

H_star>0 and y=0 H_star>0 and y>0 otherwise

Note that the coefficient associated with "y" in the structural equation (alpha) enters the reduced form associated with "Z*delta" i When writing the likelihood function, the term (alpha*Z*delta) appears in regime 3 and regime 4 and "alpha" enters the Here is my program (note that I test the program by fixing alpha to an arbitrary constant value and it seemed ok) :

capture program drop maxlik program define maxlik args lnf beta delta sig_u sig_e sig_ue quietly capture dropvars xbeta zdelta gen double xbeta=`beta' gen double zdelta=`delta' scalar s_u = exp(`sig_u') scalar s_e = exp(`sig_e') scalar s_ue = exp(`sig_ue') scalar rho = tanh(s_ue/(s_u*s_e)) scalar alpha = xbeta[1,1] scalar s_uet = (alpha^2)*s_u^2+s_e^2+2*alpha*s_ue scalar rho_et = (alpha*s_u^2+s_ue)/(sqrt(s_u^2*(alpha^2*s_u^2+s_e^2+2*alpha*s_ue))) scalar gamma = alpha*zdelta quietly{ capture dropvars regime_1 regime_2 regime_3 regime_4 gen double regime_1 = 0.0 replace regime_1 = binorm(-xbeta/s_e,-zdelta/s_u,rho) if $ML_y1==0 & $ML_y2==0 gen double regime_2 = 0.0 replace regime_2 = norm((-zdelta/s_u-rho*($ML_y1-xbeta)/s_e)/sqrt(1-rho^2))*1/s_e*normden(($ML_y1-xbeta)/s_e) if $ML_y1>0 & $ML_y2== gen double regime_3 = 0.0 replace regime_3 = norm((-gamma-xbeta-rho_et*(s_uet/s_u)*($ML_y2-zdelta))/s_uet*sqrt(1-rho_et^2))*1/s_u*normden(($ML_y2 gen double regime_4 = 0.0 replace regime_4 = (1/(2*_pi*s_u*s_uet*sqrt(1-rho_et^2)))*exp((-1/2*(1-rho_et^2))*( (($ML_y2-zdelta)/s_u)^2-2*rho_et*(($ML_y2 } quietly replace `lnf' = ln(regime_1) if $ML_y1==0 & $ML_y2==0 quietly replace `lnf' = ln(regime_2) if $ML_y1>0 & $ML_y2==0 quietly replace `lnf' = ln(regime_3) if $ML_y1==0 & $ML_y2>0 quietly replace `lnf' = ln(regime_4) if $ML_y1>0 & $ML_y2>0 end use scf86_roc.dta, clear ml model lf maxlik (beta: heures=revimp tn ipe ne nb man sas alb cb age_16_24 age_25_34 age_35_44 age_55_69 homme celib ml maximize I know all this is a bit confused. Feel free to ask for more precisions. Olivier * * * * *

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/

    

Prev by Date: Re: st: RE: Formaatin the labels of the histogram-bars ? Next by Date: st: RE: Truncating x-axis in kernel density graphs Previous by thread: st: logarithmic scales Next by thread: st: RE: Truncating x-axis in kernel density graphs Index(es):  Date  Thread

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

http://stata.com.mx/statalist/archive/2003-11/msg00772.html

05/02/2008