[Limdep Nlogit List] Calculation of marginals for dummy variables in Tobit
Durham, Cathy
cathy.durham at oregonstate.edu
Thu Sep 23 05:25:48 EST 2010
Actually I caught that and still have the same result using your variation.
Its not an oddity in my data since I have calculated the dummy effect directly
>From the same output. Is their possibly a glitch in my software or a setting I messed up
perhaps? XNEXT = .63638705397848530D+00
is the dummy marginal affect I get if I do it via CALC.
Which makes sense based on a parameter estimate of .58815857 but I don't know what is going on in the Wald test, I tested to see whether it should really be the b7 in the
Functions instead of beta-that didn't work. I made the dummy the first variable in the
Namelist and kept beta in the functions-that didn't work. As I understand the Wald test
Should bo from the first labeled parameter in the start vector, so this should be working.
I can't see where this is going off.
--> calc;vb=b(9)$
--> matrix;xb1(8)=1 $
--> matrix;xb0(8)=0 $calc;list;xt1=li-xb1'bb ;xt0=li-xb0'bb $
--> calc;list; xp1=Phi(xt1/vb);xp0=Phi(xt0/vb);xn1=N01(xt1/vb); xn0=N01(xt0/vb)$
XP1 = .72220687392314920D-01
XP0 = .14703783772632750D+00
XN1 = .13752696794854590D+00
XN0 = .23006979136968260D+00
Calculator: Computed 4 scalar results
--> calc;list ;xnext1=(xp1)*Li+(1-xp1)*((bb'xb1)+vb*xn1/(1-xp1))
;xnext0=(xp0)*Li+(1-xp0)*((bb'xb0)+vb*xn0/(1-xp0))
;xnext=xnext1-xnext0$
XNEXT1 = .45895506385881080D+01
XNEXT0 = .39531635846096230D+01
XNEXT = .63638705397848530D+00
Calculator: Computed 3 scalar results
Here is the unchanged Wald result using var
--> Wald ;labels=beta,b1,b2,b3,b4,b5,b6,b7,var
;start=B;Var=varb
;Fn1=1-Phi((Li-beta'xb1)/var)
;Fn2=1-Phi((Li-beta'xb0)/var)
;Fn3=N01((Li-beta'xb1)/var)
;Fn4=N01((Li-beta'xb0)/var)
;Fn5= (Li+Fn1*(beta'xb1 - Li+var*Fn3/Fn1)) -
(Li+Fn2*(beta'xb0 - Li+var*Fn4/Fn2)) $
+-----------------------------------------------+
| WALD procedure. Estimates and standard errors |
| for nonlinear functions and joint test of |
| nonlinear restrictions. |
| VC matrix for the functions is singular. |
| Standard errors are reported, but the |
| Wald statistic cannot be computed. |
+-----------------------------------------------+
+---------+--------------+----------------+--------+---------+
|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |
+---------+--------------+----------------+--------+---------+
Fncn(1) .12466164 .00561965 22.183 .0000
Fncn(2) .12466164 .00561965 22.183 .0000
Fncn(3) .20546402 .00647381 31.738 .0000
Fncn(4) .20546402 .00647381 31.738 .0000
Fncn(5) .000000 ......(Fixed Parameter).......
-----Original Message-----
From: limdep-bounces at limdep.itls.usyd.edu.au [mailto:limdep-bounces at limdep.itls.usyd.edu.au] On Behalf Of William Greene
Sent: Wednesday, September 22, 2010 4:53 AM
To: Limdep and Nlogit Mailing List
Subject: Re: [Limdep Nlogit List] Calculation of marginals for dummy variables in Tobit
Cathy. You should have gotten ticketed for using the symbol "v" in your list of labels in the WALD command, since "v" is the name of a scalar that you created. When I simulated some data on X and WTP and ran your program, the WALD command failed with this error message. I then changed "v" to "var" in the labels list and in all the appearances in the functions definitions, and it worked fine.
--> Wald ;labels=beta,b1,b2,b3,b4,b5,b6,b7,var
;start=B;Var=varb
;Fn1=1-Phi((Li-beta'xb1)/var)
;Fn2=1-Phi((Li-beta'xb0)/var)
;Fn3=N01((Li-beta'xb1)/var)
;Fn4=N01((Li-beta'xb0)/var)
;Fn5= (Li+Fn1*(beta'xb1 - Li+var*Fn3/Fn1)) -
(Li+Fn2*(beta'xb0 - Li+var*Fn4/Fn2)) $
------------------------------------------------------------------
WALD procedure. Estimates and standard errors for nonlinear functions and joint test of nonlinear restrictions.
VC matrix for the functions is singular.
Standard errors are reported, but the
Wald statistic cannot be computed.
Functions are computed at means of variables
--------+---------------------------------------------------------
| Standard Prob.
WaldFcns| Coefficient Error z z>|Z|
--------+---------------------------------------------------------
Fncn(1)| .15565*** .01610 9.67 .0000
Fncn(2)| .13284*** .01479 8.98 .0000
Fncn(3)| .23895*** .01630 14.66 .0000
Fncn(4)| .21472*** .01647 13.04 .0000
Fncn(5)| .01492 .01417 1.05 .2922
--------+---------------------------------------------------------
Note: ***, **, * ==> Significance at 1%, 5%, 10% level.
------------------------------------------------------------------
Regards,
Bill Greene
----- Original Message -----
From: "Cathy Durham" <cathy.durham at oregonstate.edu>
To: "Limdep and Nlogit Mailing List" <limdep at limdep.itls.usyd.edu.au>
Sent: Tuesday, September 21, 2010 10:02:14 PM GMT -05:00 Colombia
Subject: [Limdep Nlogit List] Calculation of marginals for dummy variables in Tobit
I'm having a problem with the recommended WALD procedure to calculate marginals for dummy variables in Tobit. I've tried the example on E21-9 and get the result below using some sample data.
The documentation on Wald tests and in the example indicate that using just beta, which is presumably the first parameter in B in the Fns does the job but this result has a problem. The technical details ( E21-9) indicate that 'beta' needs to be b but this seems to make it just read the first parameter from b, I don't see how beta is going to pull in the vector or what the fix is. I think I'm not understanding the Wald set up.
But this isn't working. If anyone has a suggestion or alternative approach it would help.
--> calc; Li=2 $
--> tobit;lhs=WTP;rhs=xs;
limit=Li;par $marginal; keep=estlin $
************************************************************************
* NOTE: Deleted 4 observations with missing data. N is now 887 *
************************************************************************
Normal exit from iterations. Exit status=0.
+---------------------------------------------+
| Limited Dependent Variable Model - CENSORED |
| Maximum Likelihood Estimates |
| Model estimated: Sep 21, 2010 at 05:52:28PM.|
| Dependent variable WTP |
| Weighting variable None |
| Number of observations 887 |
| Iterations completed 3 |
| Log likelihood function -1747.914 |
| Threshold values for the model: |
| Lower= 2.0000 Upper=+infinity |
| LM test [df] for tobit= 77.374[ 8] |
| ANOVA based fit measure = .078646 |
| DECOMP based fit measure = .080497 |
+---------------------------------------------+
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of
|X|
+---------+--------------+----------------+--------+---------+----------+
Primary Index Equation for Model
Constant 5.10909409 .20059045 25.470 .0000
X1 -.42173509 .12017146 -3.509 .0004 .45321308
X2 .43614041 .13161271 3.314 .0009 .29425028
X3 -.11644965 .17842206 -.653 .5140 .12739572
X4 -.02901619 .00864726 -3.356 .0008 8.58511838
X5 -.00402288 .00412285 -.976 .3292 37.4351747
X6 .71182806 .29337163 2.426 .0153 .04171364
X7 .58815857 .12295940 4.783 .0000 .38105975
Disturbance standard deviation
Sigma 1.73611921 .04121950 42.119 .0000
--> matrix;xb1=Mean(xs);xb0=xb1$
--> calc;xn=row(xb1)$
--> calc;v=b(9)$
--> matrix;xb1(8)=1 $
--> matrix;xb0(8)=0 $
--> Wald ;labels=beta,b1,b2,b3,b4,b5,b6,b7,v
;start=B;Var=varb
;Fn1=1-Phi((Li-beta'xb1)/v)
;Fn2=1-Phi((Li-beta'xb0)/v)
;Fn3=N01((Li-beta'xb1)/v)
;Fn4=N01((Li-beta'xb0)/v)
;Fn5= (Li+Fn1*(beta'xb1 - Li+v*Fn3/Fn1)) -
(Li+Fn2*(beta'xb0 - Li+v*Fn4/Fn2)) $
+-----------------------------------------------+
| WALD procedure. Estimates and standard errors |
| for nonlinear functions and joint test of |
| nonlinear restrictions. |
| VC matrix for the functions is singular. |
| Standard errors are reported, but the |
| Wald statistic cannot be computed. |
+-----------------------------------------------+
+---------+--------------+----------------+--------+---------+
|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |
+---------+--------------+----------------+--------+---------+
Fncn(1) .12466164 .00561965 22.183 .0000
Fncn(2) .12466164 .00561965 22.183 .0000
Fncn(3) .20546402 .00647381 31.738 .0000
Fncn(4) .20546402 .00647381 31.738 .0000
Fncn(5) .000000 ......(Fixed Parameter).......
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
More information about the Limdep
mailing list