[Genabel-commits] r1413 - pkg/GenABEL/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 21 21:01:30 CET 2013
Author: nd_0001
Date: 2013-11-21 21:01:30 +0100 (Thu, 21 Nov 2013)
New Revision: 1413
Added:
pkg/GenABEL/man/VIFGC.Rd
pkg/GenABEL/man/VIFGC_ovdom.Rd
Log:
Changes in GC functions
Added: pkg/GenABEL/man/VIFGC.Rd
===================================================================
--- pkg/GenABEL/man/VIFGC.Rd (rev 0)
+++ pkg/GenABEL/man/VIFGC.Rd 2013-11-21 20:01:30 UTC (rev 1413)
@@ -0,0 +1,85 @@
+\name{VIFGC}
+\alias{VIFGC}
+\title{Genomic control for various model of inheritance using VIF}
+\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{
+ \item{data}{Input vector of Chi square statistic}
+
+ \item{method}{Function of error to be optimized. Can be
+ "regress", "median" or "ks.test"}
+
+ \item{p}{Input vector of allele frequencies}
+
+ \item{x}{Model of inheritance (0 for recessive,0.5 for
+ additive, 1 for dominant, also it could be arbitrary)}
+
+ \item{index.filter}{Indexes for variables that will be
+ use for analysis in data vector}
+
+ \item{n}{The size of the sample}
+
+ \item{proportion}{The proportion of lowest P (Chi2) to be
+ used when estimating the inflation factor Lambda for
+ "regress" method only}
+
+ \item{plot}{If TRUE, plot of lambda will be produced}
+
+ \item{type_of_plot}{For developers only}
+
+ \item{lmax}{The threshold for lambda for plotting
+ (optional)}
+
+ \item{color}{The color of the plot}
+
+ \item{F}{The estimation of F (optional)}
+
+ \item{K}{The estimation of K (optional)}
+
+ \item{ladd}{The estimation of lambda for additive model
+ (optional)}
+
+ \item{clust}{For developers only}
+
+ \item{vart0}{For developers only}
+
+ \item{tmp}{For developers only}
+
+ \item{CA}{For developers only}
+
+ \item{p.table}{For developers only}
+}
+\value{
+ A list with elements \item{Zx}{output vector corrected
+ Chi square statistic} \item{vv}{output vector of VIF}
+ \item{exeps}{output vector of exepsons (NA)}
+ \item{calrate}{output vector of calrate} \item{F}{F}
+ \item{K}{K}
+}
+\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.
+}
+\examples{
+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))
+}
+\author{
+ Yakov Tsepilov
+}
+\keyword{htest}
+
Added: pkg/GenABEL/man/VIFGC_ovdom.Rd
===================================================================
--- pkg/GenABEL/man/VIFGC_ovdom.Rd (rev 0)
+++ pkg/GenABEL/man/VIFGC_ovdom.Rd 2013-11-21 20:01:30 UTC (rev 1413)
@@ -0,0 +1,67 @@
+\name{VIFGC_ovdom}
+\alias{VIFGC_ovdom}
+\title{Genomic control for over-dominant model of inheritance using VIF}
+\usage{
+ VIFGC_ovdom(data, p, method = "regress", n,
+ index.filter = NULL, proportion = 1, clust = 0,
+ vart0 = 0, tmp = 0, plot = TRUE, lmax = NULL,
+ color = "red")
+}
+\arguments{
+ \item{data}{Input vector of Chi square statistic}
+
+ \item{method}{Function of error to be optimized. Can be
+ "regress", "median" or "ks.test"}
+
+ \item{p}{Input vector of allele frequencies}
+
+ \item{index.filter}{Indexes for variables that will be
+ use for analysis in data vector}
+
+ \item{n}{size of the sample}
+
+ \item{proportion}{The proportion of lowest P (Chi2) to be
+ used when estimating the inflation factor Lambda for
+ "regress" method only}
+
+ \item{plot}{If TRUE, plot of lambda will be produced}
+
+ \item{lmax}{The threshold for lambda for plotting
+ (optional)}
+
+ \item{color}{The color of the plot}
+
+ \item{clust}{For developers only}
+
+ \item{vart0}{For developers only}
+
+ \item{tmp}{For developers only}
+}
+\value{
+ A list with elements \item{Zx}{output vector corrected
+ Chi square statistic} \item{vv}{output vector of VIF}
+ \item{exeps}{output vector of exepsons (NA)}
+ \item{calrate}{output vector of calrate} \item{F}{F}
+ \item{K}{K}
+}
+\description{
+ This function estimates the corrected statistic using
+ genomic control for the over-dominant model, using VIF.
+ VIF coefficients are estimated by optimizing different
+ error functions: regress, median and ks.test.
+}
+\examples{
+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(phdata(ge03d2)$dm2~1,data=ge03d2,gtmode = "overdominant")
+chi2.1df <- results(qts)$chi2.1df
+s <- summary(ge03d2)
+freq <- s$Q.2
+result <- VIFGC_ovdom(p=freq,method = "median",data=chi2.1df,n=nids(ge03d2))
+}
+\author{
+ Yakov Tsepilov
+}
+\keyword{htest}
+
More information about the Genabel-commits
mailing list