[Genabel-commits] r674 - pkg/VariABEL/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 7 15:14:30 CET 2011
Author: maksim
Date: 2011-03-07 15:14:29 +0100 (Mon, 07 Mar 2011)
New Revision: 674
Modified:
pkg/VariABEL/man/var.test.homogeneity.Rd
Log:
help update
Modified: pkg/VariABEL/man/var.test.homogeneity.Rd
===================================================================
--- pkg/VariABEL/man/var.test.homogeneity.Rd 2011-03-07 10:59:16 UTC (rev 673)
+++ pkg/VariABEL/man/var.test.homogeneity.Rd 2011-03-07 14:14:29 UTC (rev 674)
@@ -1,39 +1,39 @@
\name{var.test.homogeneity}
\alias{var.test.homogeneity}
-\title{function to perfome variance homogeneity test of different genotypic groups}
+\title{Function performs compariosn of genotypic variances.}
\description{
-function to perfome variance homogeneity test of different genotypic groups
+Presence of significant difference of genotypic variances points to possible
+ Significant variance difference points to possible presence of interaction between a tested SNP and a factor (or set of factors).
}
\usage{
-var.test.homogeneity(trait="", formula="", trait_df, gwa_data, dir, analysis_name_specific, how_many_sigma_drop=NULL, top_snp_num_figure=3, analysis_type = "AAvsABvsBB")
+var.test.gwaa(formula, genodata, phenodata, genodata_info=NULL, testname="sqlm", analysis_type="AAvsABvsBB")
}
\arguments{
- \item{trait}{Name of trait you are analysing (data.frame trait_df has to contain a column with this name). If it absenses or equals to "" than the trait name must be specifed in "formula"}
- \item{formula}{Object of a class "formula". It is used in case of any adljustment nessacarity. If it absenses or equals to "" than trait must be specifed}
- \item{trait_df}{Object of class "data.frame". It contains columnes with analysing trait and covariates. Should contain column with id names.}
- \item{gwa_data}{Object of class "gwaa.data"}
- \item{dir}{Directory name where all results will be put. It should be created befored analysis starts.}
- \item{analysis_name_specific}{Any set of characters. It figures as a part of a file names in output.}
- \item{how_many_sigma_drop}{Cut off point to exclude outliers. Normally distributed trait is assumed.}
- \item{top_snp_num_figure}{For how many SNPs to make boxplot.}
- \item{analysis_type}{Which test is performed. Possible values: "AAvsABvsBB" (testing all three genotipc groups),
- "AAvsABandBB" (testing AA against AB and BB together), "ABvsAAandBB", "BBvsAAandAB".}
+
+ \item{formula} Regression model used for analysis. In the first stage linear regression is run to exclude main snp effect. In this stage adjustment for covariates is performed.
+ \item{genodata} The genotypes data in format of genabel or databel object
+ \item{phenodata} The phenotypes data in format of data.frame object
+ \item{genodata_info} The file with snp information (name, position). Used if genodata is databel object.
+ \item{testname} Name of variance heterogeneity test to perform. sqlm (for imputed genotype data), levene, and bartlett test are supported.
+ \item{analysis_type} Type of analsysis to perform. AAvsABvsBB - additive model where B allele additivly increase risk, AAvsABandBB - group AA tested agains AB and BB, ABvsAAandBB - AB against AA and BB, BBvsAAandAB - BB against AA and AB. Only available for typed snps.
}
\details{
-var.test.homogeneity function perform analisis of variance homogeneity for easch SNP in data "gwa_data". The main result is pval of variance homogeneity test for each SNP.
-Bartlett's test is currently used. This assumes normality in a trait distribution. Even a couple of outliers can spoil a whole pictures.
-Input parametere "how_many_sigma_drop" should be used to protect overestimation of pval.
+The function var.test.gwaa tests for difference in genotypic variances. This difference points to presence of possible interaction between the tested SNP
+and some factor. In the case sqlm test the analysis consists of two stage: firstly the regular GWA id done where regression analysis is performed with
+covariates specified in the input parameter formula, in the second stage the regression analysis is performed with using residuals from the first stage and
+a sno as a covariate.
}
\value{
-As result the file "lambda.doc" is created which contains inflation factor, file with test statistics (name is qt1__adj__sex_age_test_results.txt
- for example in case if you analyse "qt1" with adjustment on "sex" and "age"), file those contains id names which are excluded due to
- normality resoans, manhettan plot, two qqplots (for chi2 amd pval) and boxplots for top SNPs.
+ The ouput is a data.frame object. The table contains the chisq of variance heterogeneity test (the name is chisq) the effects and standart errors of all covariates included into regression model,
+ main snp effect (the names are snp_eff and snp_se). In the case of sqlm test the columns snp_eff_dispertion and snp_se_dispertion contain
+ effect of a snp on squared vallues of a trait.
+
}
-%\references{ ~put references to the literature/web site here ~ }
+%\references{ http://www.biomedcentral.com/1471-2156/11/92/abstract }
\author{Maksim Struchalin}
%\note{ ~~further notes~~
%}
@@ -41,14 +41,13 @@
\code{\link{var.meta}},
}
\examples{
+ library(GenABEL)
data(srdta)
- mytrait_df <- srdta at phdata[,c("id","qt1","sex","age")]
- mydir <- "mydir_var_analysis"
- dir.create(mydir)
- var.test.homogeneity(formula=qt1 ~ sex + age,
- trait_df=mytrait_df, gwa_data=srdta, dir=mydir, analysis_name_specific="test", how_many_sigma_drop=3)
+ result1 <- var.test.gwaa(bt~qt1+qt2, genodata=srdta at gtdata, phenodata=srdta at phdata)
+
+#if there is no covariates needed:
+ result2 <- var.test.gwaa("bt", genodata=srdta at gtdata, phenodata=srdta at phdata)
-
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
More information about the Genabel-commits
mailing list