[Limdep Nlogit List] Error 185 using Krinsky and Robb bootstrapping method
Nathan P. Kemper
nkemper at uark.edu
Thu Apr 7 12:50:31 AEST 2016
Professor Hensher,
The example you suggested helped me a great deal. Thank you. I was able to generate Wald functions using K&R with 1000 draws. The code below gives me the means of the variables and the z, C.I. However, because I would like the take the next step of using the combinatorial test, I need to be able to save the distribution of the 1000 MWTPs so that I can then apply the Poe test in order to test treatment effects across my 5 treatments. Is there a way in the Wald command to save the bootstraps? I have placed the WALD codes I used which uses b and varb as the starting points and calculates the mean WTP using 1000 K&R but only reports the mean.
When I use my old code which works flawlessly for some of my treatments, I get that pesky error:
Error 185: MATRIX - GINV,SINV,CHOL singular, not P.D. if SINV or CHOL
I searched on the internet a solution to this problem, but without success. I believe it is related to the fact that I'm dividing coefficients by coefficients which is resulting in some values that cause the "not P.D." error and shut down the routine. I am wondering whether it is a coding or data issue. Or if I can use the new Wald command to generate a distribution of 1,000 WTPs?
Sorry for bothering again. Here is my ECLOGIT code for treatment 5 and the Wald functions below. Also, I placed the Wald proc output at the end. A sincere thank you in advance for any further advice.
sample; all$
ECLOGIT; IF [cell=5];
Lhs=CHOICE;
Choices=PRODA, PRODB, NONE;
RPL;
Pts= 250;
halton;
FCN= bng(n),bgm(n),blo(n),bmd(n),bhi(n),blc(n);
Correlated;
PDS = 8;
PARAMETERS;
MODEL:
U (PRODA)=bprice*price+bng*ng+bgm*gm+blo*lo+bmd*md+bhi*hi+blc*lc/
U (PRODB)=bprice*price+bng*ng+bgm*gm+blo*lo+bmd*md+bhi*hi+blc*lc/
U (NONE)=bnone*none;
ECM = (PRODA,PRODB)$
matrix
;v_varb = part(varb,1,36,1,36)
;b_b = part(b,1,36,1,1)
$
WALD; Labels = a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,
a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36
; Start = b_b
; Var = v_varb
; Fn1 = wtpng = a1/-a7
; Fn2 = wtpgm = a2/-a7
; Fn3 = wtplo = a3/-a7
; Fn4 = wtpmd = a4/-a7
; Fn5 = wtphi = a5/-a7
; Fn6 = wtplc = a6/-a7
; Fn7 = wtpno = a8/-a7
; k&r ; pts=1000$
-----------------------------------------------------------------------------
WALD procedure. Estimates and standard errors
for nonlinear functions and joint test of
nonlinear restrictions.
Wald Statistic = 464.47987
Prob. from Chi-squared[ 7] = .00000
Krinsky-Robb method used with 1000 draws
Functions are computed at means of variables
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
WaldFcns| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
WTPNG| 3.14315*** .61879 5.08 .0000 1.93034 4.35595
WTPGM| -1.76899*** .29734 -5.95 .0000 -2.35176 -1.18622
WTPLO| .87775** .37497 2.34 .0192 .14281 1.61268
WTPMD| .35289 .33414 1.06 .2909 -.30202 1.00779
WTPHI| .71558** .28931 2.47 .0134 .14853 1.28263
WTPLC| 1.60495*** .24355 6.59 .0000 1.12760 2.08230
WTPNO| -8.23527*** .49023 -16.80 .0000 -9.19610 -7.27445
--------+--------------------------------------------------------------------
Note: ***, **, * ==> Significance at 1%, 5%, 10% level.
-----------------------------------------------------------------------------
Nathan Kemper
Dept. of Agricultural Economics and Agribusiness
University of Arkansas - Fayetteville
More information about the Limdep
mailing list