[Limdep Nlogit List] confidence intervals
Mikołaj Czajkowski
miq at wne.uw.edu.pl
Fri Nov 28 21:23:04 EST 2008
Caroline Johanna Biehl wrote:
> Dear all,
> I try to estimate confidence intervalls for willingsness to pay estimates of a mnl model. Is there a command in nlogit for the krisky and robb (1986)-parametric bootstrapping or anything else similar?
> Thank you very much!
> Caroline
You can get confidence intervals for WTP using the delta method with the
wald command, e.g. like this:
matrix; b1=b(1:4);
varb1=varb(1:4,1:4)$ ? where parameter 4 is monetary
wald; start=b1; var=varb1; labels=la1,la2,la3,la4; pts=10000;
fn1=la1/-la4;
fn2=la2/-la4;
fn3=la3/-la4$
CALC ; List ;
; WTP01_hi = WALDFNS(1,1) + ((Sqr(VARWALD(1,1))*1.96))
; WTP01_lo = WALDFNS(1,1) - ((Sqr(VARWALD(1,1))*1.96))
; WTP02_hi = WALDFNS(2,1) + ((Sqr(VARWALD(2,2))*1.96))
; WTP02_lo = WALDFNS(2,1) - ((Sqr(VARWALD(2,2))*1.96))
; WTP03_hi = WALDFNS(3,1) + ((Sqr(VARWALD(3,3))*1.96))
; WTP03_lo = WALDFNS(3,1) - ((Sqr(VARWALD(3,3))*1.96))$
The same is possible with additional ; K&R switch in the wald command.
This will simulate draws from the structural parameters, but the upper
and lower bounds of the confidence intervals are again derived assuming
normal distribution (i.e. using 1.96 critical value).
Alternatively I use the following procedure to get c.i. without the
normality assumption (however, the draws are still from multivariate
normal):
matrix; reset$
matrix;
B1=B(1:4); ? manipulate these matrices to get K&R for only the
variables you want
VARB1=VARB(1:4,1:4); ? useful to cut b and varb for big n, if the
matrix size would exceed 50000 cells
T2=init(10000,4,0)$ ? change n for no. of trials and 4 for no. of
variables to keep (including cost)
calc; ran(179424673);
cont=1$
Proc
matrix; coef=Rndm(B1,VARB1);
T1=coef'*{-1/coef(4)}; ? adjust 4 if necessary
T2(cont,*)=T1;
cont=cont+1$
endproc
execute; n=10000$
create; a1=0;a2=0;a3=0;a4=0$
namelist; CIV=a1,a2,a3,a4$
create; CIV=T2$
dstats; rhs=CIV;all;quantiles;normality test;matrix$
calc; list; qnt(a1,.05);
qnt(a1,.95);
qnt(a2,.05);
qnt(a2,.95);
qnt(a3,.05);
qnt(a3,.95)$
The results of all the methods should be quite similar for most
applications.
Best regards,
--
Mikołaj Czajkowski
Warsaw Ecological Economics Center
Warsaw University
http://www.woee.pl/
More information about the Limdep
mailing list