Learn R Programming

GenABEL (version 1.8-0)

PGC: Polynomial genomic control

Description

This function estimates the genomic controls for different models and degrees of freedom, using polinomial function. Polinomial coefficients are estimated by optimizing different error functions: regress, median, ks.test or group regress.

Usage

PGC(data, method = "group_regress", p, df, pol.d = 3, plot = TRUE, index.filter = NULL, start.corr = FALSE, proportion = 1, n_quiantile = 5, title_name = "Lambda", type_of_plot = "plot", lmax = NULL, color = "red")

Arguments

data
Input vector of Chi square statistic
method
Function of error to be optimized. Can be "regress", "median", "ks.test" or "group_regress"
p
Input vector of allele frequencies
df
Number of degrees of freedom
pol.d
The degree of polinomial function
plot
If TRUE, plot of lambda will be produced
start.corr
For regress method use it only when you want to make calculations faster
index.filter
Index of variables in data vector, that will be used in analysis if zero - all variables will be used
proportion
The proportion of lowest P (Chi2) to be used when estimating the inflation factor Lambda for "regress" method only
n_quiantile
The number of groups for "group_regress" method
title_name
The title name for plot
type_of_plot
For developers only
lmax
The threshold for lambda for plotting (optional)
color
The color of the plot

Value

A list with elements
data
Output vector corrected Chi square statistic
b
Polinomial coefficients

Examples

Run this code
require(GenABEL.data)
data(ge03d2)
ge03d2 <- ge03d2[seq(from=1,to=nids(ge03d2),by=2),seq(from=1,to=nsnps(ge03d2),by=3)]
qts <- mlreg(dm2~1,data=ge03d2,gtmode = "additive")
chi2.1df <- results(qts)$chi2.1df
s <- summary(ge03d2)
freq <- s$Q.2
result=PGC(data=chi2.1df,method="median",p=freq,df=1, pol.d=2, plot=TRUE, lmax=1.1,start.corr=FALSE)

Run the code above in your browser using DataLab