Created
January 26, 2016 22:21
-
-
Save marcora/30596ca17d0393dacf04 to your computer and use it in GitHub Desktop.
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
## Reads data | |
S <- read.table(input,header=F) | |
if (stat_type == "Z") | |
z=S[,1] | |
if (stat_type == "CHISQ") | |
z=sqrt(S[,1]) | |
if (stat_type == "PVAL") | |
z=qnorm(S[,1]/2) | |
## calculates lambda | |
lambda = round(median(z^2)/.454,3) | |
lambda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment