inst/www/simple_exposure_mc/ui.R

library(shiny)

shinyUI(pageWithSidebar(
  
  headerPanel("Simple Exposure Misclassification"),
  
  sidebarPanel(
    numericInput("ep_op", 
                "Exposure + and Outcome +", 
                value = 215),
    numericInput("en_op", 
                "Exposure - and Outcome +", 
                value = 1449),
    numericInput("ep_on", 
                "Exposure + and Outcome -", 
                value = 668),
    numericInput("en_on", 
                "Exposure - and Outcome -", 
                value = 4296),
    sliderInput("se_p", 
                "Sensitivity when Outcome +", 
                min = 0,
                max = 1, 
                value = 0.9,
                step = 0.01),
    sliderInput("se_n", 
                "Sensitivity when Outcome -", 
                min = 0,
                max = 1, 
                value = 0.9,
                step = 0.01),
    sliderInput("sp_p", 
                "Specificity when Outcome +", 
                min = 0,
                max = 1, 
                value = 0.9,
                step = 0.01),
    sliderInput("sp_n", 
                "Specificity when Outcome -", 
                min = 0,
                max = 1, 
                value = 0.9,
                step = 0.01)
  ),
  
  mainPanel(
    tabsetPanel(
      tabPanel("Results", 
        h4("Standard and Corrected Ratios"),
        tableOutput("ratios"),
        h4("Standard Contingency Table"),
        tableOutput("standardContingency"),
        h4("Corrected Contingency Table"),
        tableOutput("correctedContingency")),
      tabPanel("Plots", 
               h4("Standard"),
               plotOutput("sc_plot"),
               h4("Corrected"),
               plotOutput("cc_plot")),
      tabPanel("Raw Output", verbatimTextOutput("rawStats"))
    )
  )
))
philliplab/qba documentation built on May 25, 2019, 5:06 a.m.