Nathaniel Phillips
Basel Research Colloquium - March 16, 2017
Software | Time to Learn | Cost | Customizability | Best Suited for |
---|---|---|---|---|
UniPark / Qualtrics | Medium | ? | Low | Questionnaires |
Inquisit | Medium / Low | ? | Medium (?) | Questionnaires, Simple stimuli |
Custom HTML / JavaScript | High | Free | Very High | Complex studies |
Shiny | Medium / High | Free* | High | Complex, statistical stimuli |
sliderInput(inputId = "prob.est",
label = "What is the probability of X?",
min = 0,
max = 100)
Becomes
h3("I don't have to do a lot of thinking")
radioButtons(inputId = "REI_q1",
label = "1 = Disagree, 5 = Agree",
choices = list(1:5))
Becomes
# Store result in prob.est
sliderInput(inputId = "prob.est",
label = "What is the probability of X?",
min = 0,
max = 100)
# Use prob.est in other code
true.value <- 33
error <- abs(input$prob.est - true.value)
h3("Your estimate was off by ", error)
# Definition of welcome page
if(CurrentValues$page == "welcome") {
h3("Welcome to the experiment"),
textInput(inputId = "workerid",
label = "Please enter a unique ID that no one else would use",
value = "",
placeholder = "e.g.; Cat57Door"),
# This displays the action putton Next.
actionButton(inputId = "gt_Instructions",
label = "Continue to Instructions")
}
observeEvent(input$gt_Instructions, {CurrentValues$page <- "instructions"})
# Definition of instructions page
if(CurrentValues$page == "instructions") {
h3("Instructions"),
p("In this experiment, you will....."),
p("On the next page, you will play a practice game"),
# This displays the action putton Next.
actionButton(inputId = "gt_Practice",
label = "Continue to Practice")
}
rei.survey <- list(
"text" = c("I don't like to have to do a lot of thinking",
"I try to avoid situations that require thinking in depth about something",
"I prefer to do something that challenges my thinking abilities rather than something that requires little thought",
"I prefer complex to simple problems",
"Thinking hard and for a long time about something gives me little satisfaction",
"I trust my initial feelings about people",
"I believe in trusting my hunches",
"My initial impressions of people are almost always right",
"When it comes to trusting people, I can usually rely on my 'gut feelings'",
"I can usually feel when a person is right or wrong even if I can't explain how I know"))
# P3) REI
if (CurrentValues$page == "rei") {
list(
h3(paste(rei.survey$text[current.question])),
em(paste(rei.survey$description)),
radioButtons(inputId = "rei_survey",
choices = rei.survey$labels),
actionButton(inputId = "nextq", label = "Continue"))
}
observeEvent(input$nextq, {
CurrentValues$question.num <- CurrentValues$question.num + 1
CurrentValues$rei <- c(CurrentValues$rei, input$rei_survey)
}})
Task | Link |
---|---|
BART (Balloon analogue risk task) | Desktop |
Bandit task | https://econpsychbasel.shinyapps.io/ShinyBandit/ |
Bandit task with goals | https://econpsychbasel.shinyapps.io/BanditGame4/ |
We are currently programming and documenting standard psychology experiments in Shiny and distributing them at http://www.github.com/ndphillips/ShinyPsych.
Check out the code, play around, let us know what works and what doesn't, and contribute!