Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Get_Logistic_Weights

Get the logistic weight


Description

Get logistic weights from either a genotype matrix (Z) or a vector of minor allele frequncies (MAF). Users can apply this weights to SKAT by giving it as the “weights” parameter. The logistic weight gives equal weights to rare variants and nearly zero weight to common variants.

Usage

Get_Logistic_Weights(Z, par1=0.07, par2=150)


	Get_Logistic_Weights_MAF(MAF, par1=0.07, par2=150)

Arguments

Z

a numeric genotype matrix with each row as a different individual and each column as a separate gene/snp. Each genotype should be coded as 0, 1, 2, and 9 for AA, Aa, aa, and missing, where A is a major allele and a is a minor allele.

MAF

a numeric vector of minor allele frequncies.

par1

a numeric value of the first parameter of the logistic weight (default= 0.07).

par2

a numeric value of the second parameter of the logistic weight(default= 150).

Details

The formula for the weight is

weights = \frac{e^{(par1 - MAF) par2}}{1 + e^{(par1 - MAF) par2}}.

Value

A vector of the logistic weight.

Author(s)

Seunggeun Lee

Examples

data(SKAT.example)
attach(SKAT.example)


#############################################################
#	Compute the P-value of SKAT with the logistic Weight (par1=0.07, par2=150)

# Use logistic weight
obj<-SKAT_Null_Model(y.c ~ X, out_type="C")
weights<-Get_Logistic_Weights(Z, par1=0.07, par2=150)
SKAT(Z, obj, kernel = "linear.weighted", weights=weights)$p.value

# Weights function
MAF<-colMeans(Z)/2
plot(MAF,weights)

SKAT

SNP-Set (Sequence) Kernel Association Test

v2.0.1
GPL (>= 2)
Authors
Seunggeun (Shawn) Lee and Zhangchen Zhao, with contributions from Larisa Miropolsky and Michael Wu
Initial release
2020-10-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.