[Limdep Nlogit List] Need a kind help

Abdulbaki Bilgic tebrik at yahoo.com
Fri Apr 7 02:27:51 EST 2006


  Dear Limdep Users,
  I am estimating a bivariate tobit model with three switching regimes: (y1>0, y2=0), (y1=0,y2>0), and (y1>0, y2>0). The last term where both y1 and y2 greater than 0 is the conditional distribution of y2 given y1 >0. I have written a code in Limdep and got a error reporting a zero division and i have checked the reference book it says a dependent variable problem and when deleting the first observation, it gives the same problem too. Any ideas please.
   
   
  CREATE ; IF(Y1 = 0 & Y2 =0)DUMMY1=1
  ; (ELSE) DUMMY1=0
  ; IF(Y1 > 0 & Y2 =0)DUMMY2=1
  ; (ELSE) DUMMY2=0
  ; IF(Y1 = 0 & Y2 >0)DUMMY3=1
  ; (ELSE) DUMMY3=0
  ; IF(Y1 > 0 & Y2 >0)DUMMY4=1
  ; (ELSE) DUMMY4=0 $
  NAMELIST ; X1 =ONE
  ; X2 =ONE $
  CALC ; LIST
  ; KA=COL(X1)
  ; KB=COL(X2)
  ; KC=KA+1 
  ; KD=KA+KB $
  MATRIX ; LIST
  ; CA=INIT(KA,1,.0)
  ; CB=INIT(KB,1,.0) $
  MAXIMIZE ; START =CA,CB,.0,.0,.0
  ; LABELS=KA_BA, KB_BB,SIGM1,SIGM2,RHO12
  ; FCN=TA1 =LOG((1+RHO12)/(1-RHO12)) |
  RHO12 =(EXP(TA1)-1)/(EXP(TA1)+1) |
  SG1 =1/(SIGM1*(SQR(1-RHO12^2))) | 
  SG2 =1/(SIGM2*(SQR(1-RHO12^2))) |
  SG3 =1/(SIGM2^2*(SQR(1-RHO12^2))) |
  ETA1 =1/(2*SIGM1^2) |
  ETA2 =1/(2*SIGM2^2) |
  ETRHO1 =RHO12*(SIGM1/SIGM2) |
  ETRHO2 =RHO12*(SIGM2/SIGM1) |
  RHOSQ =(1-RHO12^2) |
  INDEX1 =BA1'X1 |
  INDEX2 =BB1'X2 |
  ERROR1 =Y1-INDEX1 |
  ERROR2 =Y2-INDEX2 |
  INDX1 =INDEX1+ETRHO1*ERROR2 |
  INDX2 =INDEX2+ETRHO2*ERROR1 |
  INDXX1 =-SG1*INDX1 |
  INDXX2 =-SG2*INDX2 |
  DUMMY2*(-0.5*LOG(2*PI)-LOG(SIGM1)-ETA1*ERROR1^2+LOG(PHI(INDXX2)))+
  DUMMY3*(-0.5*LOG(2*PI)-LOG(SIGM2)-ETA2*ERROR2^2+LOG(PHI(INDXX1)))+
  DUMMY4*(-0.5*LOG(2*PI)-LOG(SIGM1)-ETA1*ERROR1^2-2*LOG(SIGM2)
  -0.5*LOG(RHOSQ)-SG3*(Y2-INDX2)^2) 
  ; ALG=N 
  ; TLF=1.D-8
  ; TLG=1.D-4
  ; SET $
   
  Output is:
  Error 590: Obs.= 1 Cannot compute function: Zero_dvd
  Warning 137: Iterations: function not computable at crnt. trial estimate
  Error 802: Cannot compute function at start values. Exit status=4.
  Function= .36023626764D+05, at entry, .00000000000D+00 at exit
  +---------------------------------------------+
  | User Defined Optimization |
  | Maximum Likelihood Estimates |
  | Model estimated: Apr 06, 1999 at 04:18:24PM.|
  | Dependent variable Function |
  | Weighting variable None |
  | Number of observations 22344 |
  | Iterations completed 0 |
  | Log likelihood function .0000000 |
  | Number of parameters 0 |
  | Info. Criterion: AIC = .00000 |
  | Finite Sample: AIC = .00000 |
  | Info. Criterion: BIC = .00000 |
  | Info. Criterion:HQIC = .00000 |
  +---------------------------------------------+
  +---------+--------------+----------------+--------+---------+
  |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |
  +---------+--------------+----------------+--------+---------+
  BA1   .000000 1.00000000 .000 1.0000
  BB1   .000000 1.00000000 .000 1.0000
  SIGM1 .000000 1.00000000 .000 1.0000
  SIGM2 .000000 1.00000000 .000 1.0000
  RHO12 .000000 1.00000000 .000 1.0000
    
  Best regards,



			
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


More information about the Limdep mailing list