-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSCORE.Rd
52 lines (46 loc) · 1.48 KB
/
SCORE.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SCORE.R
\name{SCORE}
\alias{SCORE}
\alias{SPA_SCORE}
\title{SCORE function}
\usage{
SCORE(x, y, cov = NULL)
SPA_SCORE(x, y, cov = NULL, output.T = FALSE)
}
\arguments{
\item{x}{The individual-level genotyes with dimension n individuals by M SNPs.
It could be only one SNPs with a n by 1 genotype vector.}
\item{y}{The individual-level phentypes with dimesion n individuals by K
phenotypes. It could be only one phenotype with a n by 1 phenotype vector.}
\item{cov}{The covariate matrix with dimesion n individuals by C covariates.
defalut: there is no covariates.}
\item{output.T}{Determine if output the test statistics. default:
output.T = FALSE}
}
\value{
A list of pvalue: K by M matrix of p-values; Tstat: K by M matrix
of the test statistics.
}
\description{
Score test for testing the association between phenotypes and SNPs.
Note that the phenotypes could be the binary phenotypes or
quantitative phenotypes.
}
\details{
\code{SCORE} Default method;
\code{SPA_SCORE} Score test by saddlepoint approximation for testing the
association between only binary phenotypes and SNPs. Note that SPA_SCORE
function can use to binary phenotypes with the unbalanced or extremely
unbalanced cast-control ratios.
}
\examples{
N <- 100
M <- 200
K <- 10
x <- replicate(M, rbinom(N,2,0.3))
y1 <- replicate(2, sample(c(0,1), N, replace = TRUE, prob = c(0.9, 0.1)))
y2 <- replicate(2, rnorm(N))
res <- SCORE(x, y2)
res1 <- SPA_SCORE(x, y1)
}