Simple sequentially scored survey

The following defines three Likert scale questions, and stores the GUI answers to a results object.

library("mirtCAT")
options(stringsAsFactors = FALSE)

### Create simple non-adaptive interface ###

## Potential options for each item
options <- matrix(c("Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"),
    nrow = 3, ncol = 5, byrow = TRUE)

questions <- c("Building CATs with mirtCAT is difficult.",
               "Building tests with mirtCAT requires a lot of coding.",
               "I would use mirtCAT in my research.")

df <- data.frame(Question = questions, Option = options, Type = "radio")
df

## Run the mirtCAT web interface and store results
results <- mirtCAT(df = df)
print(results)
summary(results)

If we wish to modify the demographics page to collect information about a participants gender and occupation, we could use the following.

### Include a demographics page to collect occupation and gender variables ###
demographics <- list(textInput(inputId = 'occupation',
                               label = 'What is your occupation?',
                               value = ''),
                     selectInput(inputId = 'gender',
                                 label = 'Please select your gender.',
                                 choices = c('', 'Male', 'Female', 'Other'),
                                 selected = ''))
results <- mirtCAT(df, shinyGUI = list(demographics = demographics,
                                              demographics_inputIDs = c('occupation', 'gender')))
summary(results)