~ubuntu-branches/ubuntu/quantal/r-cran-genabel/quantal

« back to all changes in this revision

Viewing changes to man/mmscore.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2011-02-05 18:06:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110205180624-i1twt82zdpepmfxw
Tags: upstream-1.6-4
ImportĀ upstreamĀ versionĀ 1.6-4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\name{mmscore}
 
2
\alias{mmscore}
 
3
\title{Score test for association in related people}
 
4
\description{
 
5
Score test for association between a trait and genetic polymorphism, 
 
6
in samples of related individuals
 
7
}
 
8
\usage{
 
9
mmscore(h2object,data,snpsubset,idsubset,strata,times=1,quiet=FALSE,bcast=10,clambda=TRUE,propPs=1.0)
 
10
}
 
11
\arguments{
 
12
  \item{h2object}{An object returned by \code{\link{polygenic}} polygenic mixed model analysis 
 
13
        routine. The sub-objects used are measuredIDs, residualY, and InvSigma. One can supply 
 
14
        mmscore with a fake h2object, containing these list elements. 
 
15
        }
 
16
  \item{data}{An object of \code{\link{gwaa.data-class}}. 
 
17
                ALWAYS PASS THE SAME OBJECT WHICH WAS USED FOR i\code{\link{polygenic}} ANALYSIS,
 
18
                NO SUB-SETTING IN IDs (USE IDSUBSET ARGUMENT FOR SUB-SETTING)!!!}
 
19
  \item{snpsubset}{Index, character or logical vector with subset of SNPs to run analysis on. 
 
20
                If missing, all SNPs from \code{data} are used for analysis.}
 
21
  \item{idsubset}{Index, character or logical vector with subset of IDs to run analysis on. 
 
22
                If missing, all people from \code{data/cc} are used for analysis.}
 
23
  \item{strata}{Stratification variable. If provieded, scores are computed within strata and 
 
24
                then added up.}
 
25
  \item{times}{If more then one, the number of replicas to be used in derivation of 
 
26
                empirical genome-wide significance. NOTE: The structure of the data 
 
27
                is not exchangable, therefore do not use times > 1 
 
28
                unless you are really sure you understand what you are doing!
 
29
                }
 
30
  \item{quiet}{do not print warning messages}
 
31
  \item{bcast}{If the argument times > 1, progress is reported once in bcast replicas}
 
32
  \item{clambda}{If inflation facot Lambda is estimated as lower then one, this parameter 
 
33
                controls if the original P1df (clambda=TRUE) to be reported in Pc1df, 
 
34
                or the original 1df statistics is to be multiplied onto this "deflation" 
 
35
                factor (clambda=FALSE).
 
36
                If a numeric value is provided, it is used as a correction factor.}
 
37
  \item{propPs}{proportion of non-corrected P-values used to estimate the inflation factor Lambda,
 
38
                passed directly to the \code{\link{estlambda}}}
 
39
}
 
40
\details{
 
41
        Score test is performed using the formula
 
42
 
 
43
        \deqn{
 
44
        \frac{((G-E[G]) V^{-1} residualY)^2}{(G-E[G]) V^{-1} (G-E[G])}
 
45
        }
 
46
 
 
47
        where \eqn{G} is the vector of genotypes (coded 0, 1, 2) and \eqn{E[G]} is 
 
48
        a vector of (strata-specific) mean genotypic values; \eqn{V^{-1}} is the 
 
49
        InvSigma and \eqn{residualY} are residuals from the trait analysis 
 
50
        with \code{\link{polygenic}} procedure.
 
51
 
 
52
        This test is similar to that implemented by Abecasis et al. (see reference). 
 
53
}
 
54
\value{
 
55
  Object of class \code{\link{scan.gwaa-class}}; only 1 d.f. test is 
 
56
  implemented currently.
 
57
}
 
58
\references{
 
59
Chen WM, Abecasis GR. Family-based association tests for genome-wide association 
 
60
scans. Am J Hum Genet. 2007 Nov;81(5):913-26. 
 
61
}
 
62
\author{Yurii Aulchenko}
 
63
%\note{}
 
64
\seealso{
 
65
\code{\link{grammar}},
 
66
\code{\link{qtscore}},
 
67
\code{\link{egscore}},
 
68
\code{\link{plot.scan.gwaa}},
 
69
\code{\link{scan.gwaa-class}}
 
70
}
 
71
\examples{
 
72
# ge03d2 is rather bad data set to demonstrate grammar, 
 
73
# because this is a population-based study
 
74
data(ge03d2.clean)
 
75
#take half for speed
 
76
ge03d2.clean <- ge03d2.clean[1:450,]
 
77
gkin <- ibs(ge03d2.clean,w="freq")
 
78
h2ht <- polygenic(height ~ sex + age,kin=gkin,ge03d2.clean)
 
79
h2ht$est
 
80
mm <- mmscore(h2ht,data=ge03d2.clean)
 
81
# compute grammar
 
82
gr <- qtscore(h2ht$pgres,data=ge03d2.clean,clam=FALSE)
 
83
#compute GC
 
84
gc <- qtscore(height ~ sex + age,data=ge03d2.clean)
 
85
#compare
 
86
plot(mm,df="Pc1df",cex=0.5)
 
87
add.plot(gc,df="Pc1df",col="red")
 
88
add.plot(gr,df="Pc1df",col="lightgreen",cex=1.1)
 
89
# can see that mmscore and grammar are quite the same... in contrast to GC
 
90
}
 
91
\keyword{htest}% at least one, from doc/KEYWORDS