Decision by Sampling Calculator

This calculator implements the decision-by-sampling model for risky choices reported in Stewart, Chater, and Brown (2006), Stewart and Simpson (2008) and Stewart (2009). You can view an animation illustrating the model. The example R code implements the model for one example of the common ratio effect from Kahneman and Tversky (1979). Pressing "run" submits the code to R and generates predictions, or you can edit the code for your own choices. Predictions appear at the bottom of the output page, and give the probability of selecting each gamble in each choice.

Full source code for the model is available, with worked examples explaining the model in detail.

You can attach data from an external file, though you do not need to do so for the default example. The file should be a text file, with white spaces delimiting the fields, and column headings beginning with a letter and containing only letters, digits, and '.'. The data file is stored as a data.frame in X, and the variables within X are attached. For example, for the data file below, X$a=c(1, 4, 7), and a=c(1,4,7).

a b c
1 2 3
4 5 6
7 8 9

Select a local file to submit:

 

 

Powered by R and Rweb