View gist:9665572
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load library | |
library(RSkittleBrewer) | |
# Differences in mean between 0 and 5 | |
sig = seq(0,5,length=100) | |
# This is the sample size | |
ss = 20 | |
# Calculate power from 200 replicated tests |
View P-value histogram Med Journals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## See the paper by Jager and Leek and associated discussion | |
## for more information: http://biostatistics.oxfordjournals.org/content/15/1/1 | |
## For the code to perform the analysis in that paper or to see how the p-values | |
## were collected see the repo: https://github.com/jtleek/swfdr | |
## The data for this gist are available here: | |
## https://github.com/jtleek/swfdr/blob/master/pvalueData.rda | |
## Load packages | |
library(ggplot2) |
View any-pvalue-significant.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Load library/set seed | |
set.seed(1325) | |
library(qvalue) | |
library(RSkittleBrewer) | |
trop = RSkittleBrewer("tropical") | |
## Set a target p-value | |
target_pval = 0.8 | |
## Not significant if we |
View This is a test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blah blah blah 2 |
View predict_function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(lubridate) | |
dt = "2015-11-18" | |
predict_function = function(dt){ | |
dt_ymd = ymd(dt) | |
## Get some info | |
mday_dt = mday(dt_ymd) | |
wday_dt = wday(d_ymd) | |
## Download data |
View puzzlehard_nov25_2015.delim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
col3 col2 col4 col1 | |
h b t t | |
i w i g | |
k t g n | |
n h n i |
View puzzle_nov25_2015.delim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
col3 col2 col4 col1 | |
h a t t | |
i v i g | |
k s g n | |
n g n i |
View tday.delim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
col1 col3 col2 | |
t h a | |
n k s | |
g i v | |
i n g |
View googleCite.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################### | |
# Some functions to quantify your Google Scholar citations page. | |
# R functions Copyright (C) 2011 John Muschelli (jmuschel@jhsph.edu), Andrew Jaffe (ajaffe@jhsph.edu), | |
# Jeffrey Leek (jtleek@gmail.com), and the Simply Statistics Blog | |
# (http://simplystatistics.tumblr.com, http://twitter.com/simplystats) | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
View dumb-resid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f1 = formula(log(cost) ~ date) | |
lm1 = lm(f1,data=nuclear) | |
stat = lm1$coeff[2] | |
resid = lm1$residuals | |
fit = lm1$fitted.values | |
n = dim(nuclear)[1] | |
B = 500 | |
stat0 = rep(0,B) |
OlderNewer