library(shiny)

shinyUI(bootstrapPage(
    includeHTML("navbar.html"),
    headerPanel("Power function of a test"),
    sidebarPanel(
        radioButtons("alternative", "Hypotheses",
                     list("\\(H_0:\\mu=\\mu_0\\quad H_0:\\mu\\neq \\mu_0\\)" = "two-sided",
                          "\\(H_0:\\mu\\leq\\mu_0\\quad H_0:\\mu> \\mu_0\\)" = "larger",
                          "\\(H_0:\\mu\\geq\\mu_0\\quad H_0:\\mu< \\mu_0\\)" = "smaller")
                     ),
        sliderInput("power.mu0","\\(\\mu_0\\)",min=-5,max=5,value=1),
        sliderInput("power.n","Sample size n",min=1,max=100,value=10),
        sliderInput("power.level","Level \\(\\alpha\\)of the test",min=0.01,max=0.5,value=0.05,step=0.01),
        helpText("Model:","\\(X_1,\\dots,X_n\\sim N(\\mu,1)\\) independently with \\(\\mu\\in\\mathbb{R}\\) unknown.\n",
                 "Test: based on \\(T=\\sqrt{n}(\\bar X - \\mu_0)\\).")
    ),
    mainPanel(plotOutput("cdf")),
    includeHTML("mycode.html")
)
        )