Random Utility Calculator

This calculator implements a random utility model. The model takes a single-parameter, user-defined utility function and a user-defined distribution for that parameter. The code calculates the probability of choosing each gamble, assuming that a utility function parameter is drawn at random from the distribution.

The example R code implements the model for a simple example choice. 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 an application to the Kahneman and Tversky (1979) choices.

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