Last data update: 2014.03.03

R: Genomic control for various model of inheritance using VIF
VIFGCR Documentation

Genomic control for various model of inheritance using VIF

Description

This function estimates corrected statistic using genomic control for different models (recessive, dominant, additive etc.), using VIF. VIF coefficients are estimated by optimizing different error functions: regress, median and ks.test.

Usage

  VIFGC(data, p, x, method = "regress", n,
    index.filter = NULL, proportion = 1, clust = 0,
    vart0 = 0, tmp = 0, CA = FALSE, p.table = 0,
    plot = TRUE, lmax = NULL, color = "red", F = NULL,
    K = NULL, type_of_plot = "plot", ladd = NULL)

Arguments

data

Input vector of Chi square statistic

method

Function of error to be optimized. Can be "regress", "median" or "ks.test"

p

Input vector of allele frequencies

x

Model of inheritance (0 for recessive,0.5 for additive, 1 for dominant, also it could be arbitrary)

index.filter

Indexes for variables that will be use for analysis in data vector

n

The size of the sample

proportion

The proportion of lowest P (Chi2) to be used when estimating the inflation factor Lambda for "regress" method only

plot

If TRUE, plot of lambda will be produced

type_of_plot

For developers only

lmax

The threshold for lambda for plotting (optional)

color

The color of the plot

F

The estimation of F (optional)

K

The estimation of K (optional)

ladd

The estimation of lambda for additive model (optional)

clust

For developers only

vart0

For developers only

tmp

For developers only

CA

For developers only

p.table

For developers only

Value

A list with elements

Zx

output vector corrected Chi square statistic

vv

output vector of VIF

exeps

output vector of exepsons (NA)

calrate

output vector of calrate

F

F

K

K

Author(s)

Yakov Tsepilov

Examples

require(GenABEL.data)
data(ge03d2)
# truncate the data to make the example faster
ge03d2 <- ge03d2[seq(from=1,to=nids(ge03d2),by=2),seq(from=1,to=nsnps(ge03d2),by=3)]
qts <- mlreg(dm2~sex,data=ge03d2,gtmode = "dominant")
chi2.1df <- results(qts)$chi2.1df
s <- summary(ge03d2)
freq <- s$Q.2
result <- VIFGC(p=freq,x=1,method = "median",CA=FALSE,data=chi2.1df,n=nids(ge03d2))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GenABEL)
Loading required package: MASS
Loading required package: GenABEL.data
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GenABEL/VIFGC.Rd_%03d_medium.png", width=480, height=480)
> ### Name: VIFGC
> ### Title: Genomic control for various model of inheritance using VIF
> ### Aliases: VIFGC
> ### Keywords: htest
> 
> ### ** Examples
> 
> require(GenABEL.data)
> data(ge03d2)
> # truncate the data to make the example faster
> ge03d2 <- ge03d2[seq(from=1,to=nids(ge03d2),by=2),seq(from=1,to=nsnps(ge03d2),by=3)]
> qts <- mlreg(dm2~sex,data=ge03d2,gtmode = "dominant")
> chi2.1df <- results(qts)$chi2.1df
> s <- summary(ge03d2)
> freq <- s$Q.2
> result <- VIFGC(p=freq,x=1,method = "median",CA=FALSE,data=chi2.1df,n=nids(ge03d2))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>