# Load data
data(ramdata)
# Set seed, to replicate simulated critical values
set.seed(42)
# list of preferences
pref_list <- matrix(c(1, 2, 3, 4, 5,
2, 1, 3, 4, 5,
2, 3, 4, 5, 1,
5, 4, 3, 2, 1), ncol=5, byrow=TRUE)
# revealed preference using only RAM restrictions
result1 <- revealPref(menu = ramdata$menu, choice = ramdata$choice, method = "GMS",
pref_list = pref_list, RAM = TRUE, AOM = FALSE)
summary(result1)
# revealed preference using only AOM restrictions
result2 <- revealPref(menu = ramdata$menu, choice = ramdata$choice, method = "GMS",
pref_list = pref_list, RAM = FALSE, AOM = TRUE)
summary(result2)
# revealed preference using both RAM and AOM restrictions
result3 <- revealPref(menu = ramdata$menu, choice = ramdata$choice, method = "GMS",
pref_list = pref_list, RAM = TRUE, AOM = TRUE)
summary(result3)
# revealed preference employing additional restrictions for binary choice problems
result4 <- revealPref(menu = ramdata$menu, choice = ramdata$choice, method = "GMS",
pref_list = pref_list, RAM = TRUE, AOM = TRUE, attBinary = 2/3)
summary(result4)
Run the code above in your browser using DataLab