*! version 1.2.0 02jun2011

Title

poetest -- Test for differences in Willingness to Pay values (or other empirical distributions) according to the complete combinatorial approach presented in Poe et al. (2005)

Syntax

poetest namelist
,
[model1({modelspec1}) model2({modelspec2}) price(string) currentdata repl({#}) seed({#})]

Main
model1(modelspec1) stored results of model 1.

model2(modelspec2) stored results of model 2.

price(string) identifies the price attribute.

currentdata specifiy this option instead of model1 and model2 if you provide your own draws.

repl(#) specifies the number of replications of Krinsky Robb draws. The default is repl(1000).

seed(#) set the seed. Default value is seed(5426).

by is not allowed; see [D] by.

fweights are not allowed; see weight.

Description

poetest applies the complete combinatorial method to test for differences in Willingness To Pay values (or any distributions) of two independent samples. The test was origially proposed by Poe et al. (1994) and modified in Poe et al. (2005). The attribute is specified in namelist and the price attribut in the option price. Further, the command can also be used to take Krinsky Robb draws of any nonlinear combination in the form of a/b, where a is the parameter of namelist and b is specified in price. The draws are saved as a matrix. Type return list after poetest.

Options

Main

model1 specifies the first model of which WTP values should be compared.

model2 specifies the second model of which WTP values should be compared.

price specifies the price attribute. That is the denominator of a/b

currentdata can only be used if model1 and model2 are not used. When this option is used, varlist is assumed to be two variables where the first one are draws from the first distribution and the second one are the draws from the second distribution.

repl sets the number of replications. The default is 1000. Be careful: with 1000 replications you make 1 Mio. comparisions. Too many replications will overburden Statas capabilities

seed sets the seed. The default is 5426.

Remarks

This command is in beta version. Do not rely on results. Comments are welcome.

Examples

Consider the following example that contains the first rows from the data used in Huber and Train (2001).
pid is the agent, gid the choice situation, y the dependent variable. price local wknown tod and seasonal are attributes. In the example we want to test whether the first 50 respondents decided different to the last 50 respondents:

pid gid y price contract local wknown tod seasonal
1 1 0 7 5 0 1 0 0
1 1 0 9 1 1 0 0 0
1 1 0 0 0 0 0 0 1
1 1 1 0 5 0 1 1 0
1 2 0 7 0 0 1 0 0
1 2 0 9 5 0 1 0 0
1 2 1 0 1 1 0 1 0
1 2 0 0 5 0 0 0 1

. use http://fmwww.bc.edu/repec/bocode/t/traindata.dta, clear

. clogit y contract local wknown tod seasonal price if pid<=50, group(gid)

. est store first50

. clogit y contract local wknown tod seasonal price if pid>50, group(gid)

. est store second50

. poetest contract, model1(first50) model2(second50) price(price) repl(500) seed(1002)

. clear

. mat will=r(wtp_draws)

. svmat will

. poetest will1 will2 , currentdata

Stored results

poetest stores the following in e():

Scalars

r(reps) Number of replications used

r(p2) Probability of H2: WTP1>WTP2

r(p1) Probability of H1: WTP1<WTP2

Matrices

e(meanwtp) Mean WTP values

e(wtp_draws) Draws used in the test

References

Poe G. L., K. L. Giraud, and J. B. Loomis 2005. Computational methods for measuring the difference of
empirical distributions. American Journal of Agricultural Economics, 87: 353–365.

Poe G. L., E. K. Severance-Lossin, and W. P. Welsh 1994. Measuring the difference (X - Y) of simulated
distributions: A convolutions approach. American Journal of Agricultural Economics, 76: 904–915.

Huber, J., and K. Train, 2001. On the similarity of classical
and Bayesian estimates of individual mean partworths.
Marketing Letters 12: 259-269.

Authors

Comments and suggestions are welcome.

Julian Sagebiel

Institute for Ecological Economy Research

Berlin, Germany

julian.sagebiel@ioew.de

juliansagebiel@gmail.com

Acknowledgements

I appreciate comments, inputs and testing from Juergen Meyerhoff and Klaus Glenk.

Also see

Help: wtp, wtpcikr (if installed)