Readme file.
These are instructions for applying the Matlab code used to generate the data analysis in Regenwetter and Davis-Stober (2012).
This code is an implementation of the order-constrained inference data analysis framework of Davis-Stober (2009).
Note to the reader: This is the code used for the Regenwetter & Davis-Stober (2012) analysis. A newer, optimized version of this code of is also available.
Please contact Dr. Clintin Davis-Stober at stoberc@missouri.edu for more information.
A full-featured stand-alone program with a graphical user interface is under development.
Our analysis was conducted in the following fashion.
The following steps should be repeated with each individual set of choice data that the researcher is interested in testing.
1) run facetchecker1.m. This function takes as input the observed choices, the number of times each choice was observed, and the matrix representation of
the facet defining inequalities for the weak order polytope, "B". The matrix B is located in the .mat file
denoted "FinalWorkingMatrix.mat" and must be loaded prior to running facetchecker1.m. The observed choice data must be
entered in the following order (for five choice alternatives:a,b,c,d,e)
x1 = # of times a chosen over b
x2 = # of times a chosen over c
x3 = # of times a chosen over d
x4 = # of times a chosen over e
x5 = # of times b chosen over c
x6 = # of times b chosen over d
x7 = # of times b chosen over e
x8 = # of times c chosen over d
x9 = # of times c chosen over e
x10 = # of times d chosen over e
x11 = # of times b chosen over a
x12 = # of times c chosen over a
x13 = # of times d chosen over a
x14 = # of times e chosen over a
x15 = # of times c chosen over b
x16 = # of times d chosen over b
x17 = # of times e chosen over b
x18 = # of times d chosen over c
x19 = # of times e chosen over c
x20 = # of times e chosen over d
The input format for the # of times each pair was presented (n1,n2, etc.) is entered in exactly the same order.
The function "facetchecker1.m" outputs the number of facet-defining inequalities in "B" that the observed
choice proportions violate. If this number is 0, the analysis is complete as the data give a perfect
fit to the weak order model. If this number does not equal 0, continue to step 2.
2) Run "ConstrainedLRTWOP.m". This function takes as input the very same information as
"facetchecker1.m" and in the same file format. As before, the matrix "B" must be
loaded into the Matlab workspace. "ConstrainedLRTWOP.m" outputs: the value of the likelihood
ratio test (LR), the p-value of the test (pvalue), the maximum likelihood estimate (MLE), and a
weighting vector giving the mixture weights of the resulting Chi-bar squared distribution (weightvector). This weighting vector
is ordered in ascending order according to the degrees of freedom in the corresponding Chi-bar squared distributions (see Davis-Stober, 2009).
Note that all files in the zip folder must be extracted to the same folder to work properly. The program "ContrainedLRTWOP.m" requires
several other (included) programs to operate properly. Note also that these algorithms require Matlab version 7.0 or higher and
version 2.0 or higher of the Matlab Optimization Toolbox to operate properly.
We also provide the raw PORTA output in the file "SWOPfiveFacets.txt".
This output gives all facet defining inequalities for the Weak Order Polytope over five choice alterntives.
Each x_{1} variable in the PORTA output corresponds to a choice probability in the Weak Order Polytope. The ordering, however, is not the same as that described
above for the statistical analysis. The PORTA output is ordered as follows:
x1 = probability of a chosen over b
x2 = probability of a chosen over c
x3 = probability of a chosen over d
x4 = probability of a chosen over e
x5 = probability of b chosen over a
x6 = probability of b chosen over c
x7 = probability of b chosen over d
x8 = probability of b chosen over e
x9 = probability of c chosen over a
x10 = probability of c chosen over b
x11 = probability of c chosen over d
x12 = probability of c chosen over e
x13 = probability of d chosen over a
x14 = probability of d chosen over b
x15 = probability of d chosen over c
x16 = probability of d chosen over e
x17 = probability of e chosen over a
x18 = probability of e chosen over b
x19 = probability of e chosen over c
x20 = probability of e chosen over d
-Clintin P. Davis-Stober, Ph.D.
-Department of Psychological Sciences
-University of Missouri
-Columbia, MO
-65202