Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Created June 9, 2015 13:49
Show Gist options
  • Save explodecomputer/5550589b78f706c78251 to your computer and use it in GitHub Desktop.
Save explodecomputer/5550589b78f706c78251 to your computer and use it in GitHub Desktop.
QQ plot in R
qqplotpval <- function(P, filename=NULL)
{
require(GenABEL)
l <- estlambda(P, method="median")
nom <- paste("lambda = ", round(l$estimate, 3), sep="")
if(!is.null(filename))
{
png(filename)
}
estlambda(P, method="median", plot=TRUE, main=nom)
if(!is.null(filename))
{
dev.off()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment