# NOT RUN {
# Load data
data(ramdata)
# Set seed, to replicate simulated critical values
set.seed(42)
# Inference based on the standard random attention model
result <- rAtte(menu = ramdata$menu, choice = ramdata$choice, method = "GMS",
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))
summary(result)
# Inference employing additional restrictions for binary choice problems
result2 <- rAtte(menu = ramdata$menu, choice = ramdata$choice, method = "GMS", attBinary = 2/3,
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))
summary(result2)
# }
Run the code above in your browser using DataCamp Workspace