Get_Logistic_Weights | R Documentation |

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.

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

`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). |

The formula for the weight is

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

A vector of the logistic weight.

Seunggeun Lee

data(SKAT.example) ############################################################# # Compute the P-value of SKAT with the logistic Weight (par1=0.07, par2=150) # Use logistic weight Z<-SKAT.example$Z obj<-SKAT_Null_Model(y.c ~ X, out_type="C", data=SKAT.example) 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)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.