Skip to content

Instantly share code, notes, and snippets.

View rkbarney's full-sized avatar

Rich Barney rkbarney

  • San Francisco, CA
View GitHub Profile
@rkbarney
rkbarney / power.R
Created September 12, 2019 21:45
Does the power test tell me I need way high N than if I use prop.test?
> prop.test(x = c(300,250), n = c(50000,50000), conf.level = 0.05)
2-sample test for equality of proportions with continuity
correction
data: c(300, 250) out of c(50000, 50000)
X-squared = 4.3896, df = 1, p-value = 0.03616
alternative hypothesis: two.sided
5 percent confidence interval:
0.0009506696 0.0010493304
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = 'Survey ETL Tool'),
dashboardSidebar(),
dashboardBody(
titlePanel(tableOutput('var.info')),
tags$div(id = 'placeholder')
)
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
titlePanel(tableOutput('var.info')),
tags$div(id = 'placeholder')
)
# Define server logic required to draw a histogram
server <- function(input, output) {
dat.names <- colnames(iris)