[Genabel-commits] r1355 - pkg/GenABEL/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 30 17:40:46 CET 2013
Author: lckarssen
Date: 2013-10-30 17:40:46 +0100 (Wed, 30 Oct 2013)
New Revision: 1355
Modified:
pkg/GenABEL/R/grammar.R
Log:
In GenABEL's grammar.R:
- Small corrections in the code layout of the example code
- Minor typo fixed in a comment and the intro text
Modified: pkg/GenABEL/R/grammar.R
===================================================================
--- pkg/GenABEL/R/grammar.R 2013-10-30 16:34:41 UTC (rev 1354)
+++ pkg/GenABEL/R/grammar.R 2013-10-30 16:40:46 UTC (rev 1355)
@@ -1,6 +1,6 @@
#' GRAMMAR test for association in samples with genetic structure
#'
-#' Fast approximate test for association between a trait and genetic polymorphism,
+#' Fast approximate test for association between a trait and genetic polymorphisms,
#' in samples with genetic sub-structure (e.g. relatives). The function implements
#' several varieties of GRAMMAR ('gamma','gc', and 'raw').
#'
@@ -9,21 +9,21 @@
#' is conservative and generates biased estimates of regression coefficients.
#'
#' With 'gc' argument, the GRAMMAR-GC (Amin et al., 2007) is implemented.
-#' This method solves conservativity of the test, but the Genomic Control (GC)
+#' This method solves the conservativity of the test, but the Genomic Control (GC)
#' lambda is by definition "1" and can not serve as an indicator of goodness of
#' the model; also, the estimates of regression coefficients are biased (the
#' same as in 'raw' GRAMMAR).
#'
#' GRAMMAR-Gamma (default 'gamma' argument) solves these problems, producing
-#' correct distribution of the test statistic, interpretable value of GC Lambda,
+#' a correct distribution of the test statistic, interpretable value of GC Lambda,
#' and unbiased estimates of the regression coefficients. All together, the
#' default 'gamma' method is recommended for use.
#'
#' @param polyObject object returned by \code{\link{polygenic}} function
#' @param data object of \code{\link{gwaa.data-class}}
#' @param method to be used, one of 'gamma','gc', or 'raw'
-#' @param propPs proportion of non-corrected P-values used to estimate the inflation factor Lambda,
-#' passed directly to the \code{\link{estlambda}}
+#' @param propPs proportion of non-corrected P-values used to estimate
+#' the inflation factor Lambda, passed directly to the \code{\link{estlambda}}
#' @param ... arguments passed to the function used for computations,
#' (\code{\link{qtscore}})
#'
@@ -52,19 +52,19 @@
#' @examples
#' # Using clean ge03d2 data
#' data(ge03d2.clean)
-#' #take small piece for speed
+#' # take only a small piece for speed
#' ge03d2.clean <- ge03d2.clean[1:200,]
#' # estimate genomic kinship
-#' gkin <- ibs(ge03d2.clean[,sample(autosomal(ge03d2.clean),1000)],w="freq")
-#' # perform polygneic analysis
-#' h2ht <- polygenic(height ~ sex + age,kin=gkin,ge03d2.clean)
+#' gkin <- ibs(ge03d2.clean[,sample(autosomal(ge03d2.clean),1000)], w="freq")
+#' # perform polygenic analysis
+#' h2ht <- polygenic(height ~ sex + age, kin=gkin, ge03d2.clean)
#' h2ht$est
#' # compute mmscore stats
-#' mm <- mmscore(h2ht,data=ge03d2.clean)
+#' mm <- mmscore(h2ht, data=ge03d2.clean)
#' # compute grammar-gc
-#' grGc <- grammar(h2ht,data=ge03d2.clean,method="gc")
-#' #compute grammar-gamma
-#' grGamma <- grammar(h2ht,data=ge03d2.clean,method="gamma")
+#' grGc <- grammar(h2ht, data=ge03d2.clean, method="gc")
+#' # compute grammar-gamma
+#' grGamma <- grammar(h2ht, data=ge03d2.clean, method="gamma")
#' # compare lambdas
#' lambda(mm)
#' estlambda(mm[,"chi2.1df"])
@@ -72,7 +72,7 @@
#' estlambda(grGamma[,"chi2.1df"])
#' lambda(grGc)
#' estlambda(grGc[,"chi2.1df"])
-#' #compare top results
+#' # compare top results
#' summary(mm)
#' summary(grGamma)
#' summary(grGc)
@@ -119,7 +119,7 @@
stop("method should be one of 'gamma','gc', or 'raw'")
}
- ## set uncorrectet stats to NA to avoid confusion
+ ## set uncorrected stats to NA to avoid confusion
out at results[,"effAB"] <- out at results[,"effBB"] <- out at results[,"chi2.2df"] <-
out at results[,"P2df"] <- NA
out at call <- match.call()
More information about the Genabel-commits
mailing list