famSKAT: Implicit matrix for family-based SKAT test

Description Usage Arguments Value Note References See Also Examples

View source: R/famskat.R

Description

Like link{SKAT.matrixfree} but for the family-based test of Chen and colleagues

Usage

1
2
3
4
5
6
7
8
9
famSKAT(G, model,...)
## S3 method for class 'lmekin'
famSKAT(G, model, kinship,  weights = function(maf) dbeta(maf, 1, 25),...)
## S3 method for class 'GENESIS.nullMixedModel'
famSKAT(G, model, threshold=1e-10,  weights = function(maf) dbeta(maf, 1, 25),...)
## S3 method for class 'famSKAT_lmekin'
update(object,G,...)
## S3 method for class 'famSKAT_genesis'
update(object,G,...)

Arguments

G

A 0/1/2 matrix whose columns are markers and whose rows are samples. Should be mostly zero.

model

Object representing a linear mixed model for covariate adjustment. Current methods are for class lmekin which must have been fitted with x=TRUE, and for the output of fitNullMM from the GENESIS package.

kinship

The sparse kinship matrix: the model will have used 2*kinship in its varlist argument.

threshold

A threshold for setting elements of the phenotype precision matrix to exact zeros.

weights

A weight function used in SKAT: the default is the standard one.

object

An existing famSKAT object to be updated with a new set of genotypes (eg for a new gene or genomic window), keeping the same phenotype and kinship structure. Avoids recomputing the Cholesky square root of the phenotype variance matrix, which will often be a computational bottleneck.

...

for future expansion

Value

An object of class c("famSKAT","matrixfree")

Note

The matrix and test statistic both differ by a factor of var(y)/2 from SKAT.matrixfree when used with unrelated individuals (because the Chen et al reference differs from the original SKAT paper by the same factor)

References

Chen H, Meigs JM, Dupuis J (2013) Sequence Kernel Association Test for Quantitative Traits in Family Samples. Genet Epidemiol. 37(2): 196-204.

See Also

SKAT.matrixfree, pQF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
data(seqMetaExample)

m<-coxme::lmekin(y~sex+bmi+(1|id),data=pheno2,varlist=2*kins,
	x=TRUE,y=TRUE,method="REML")

#first gene
g1snps<-c("1000001", "1000002", "1000003", "1000004", "1000005", "1000006", 
"1000007", "1000008", "1000009", "1000010", "1000012", "1000013", 
"1000014", "1000015")
Z2gene1<-Z2[,g1snps]

f<-famSKAT(Z2gene1, m, kins)
Q<-f$Q()
all.equal(Q, 56681.209)
## correct p is 0.742756401
pQF(Q,f,neig=4)

## gene10
g10snps<-as.character(1000017:1000036)
Z2gene10<-Z2[,g10snps]
f10<-update(f, Z2gene10)
Q10<-f10$Q()
all.equal(Q10,164656.19)
pQF(Q10,f10,neig=4)

bigQF documentation built on Nov. 23, 2021, 5:06 p.m.