Get_zeta: Calculate Covariances of Z-scores between Traits from...

Description Usage Arguments Value Author(s) Examples

View source: R/sumstats.R

Description

This function allows you to estimate the matrix ζ to adjust for the potential sample overlap in the data set. Here we applied LD pruning (r^2 < 0.1 in 500kb region) on 1000 Genome genotype dataset (hg19) as a list of reference independent SNPs. The SNP ID is chr:pos.

Usage

1
Get_zeta(Zscore, pval_cutoff = 0.05, Indp_common_snp)

Arguments

Zscore

a numeric list, each sublist containing a vector of Z scores of SNPs with minor allele frequency (MAF) larger than 0.05. The chr:pos for each SNP is required.

pval_cutoff

a numeric value indicating the cutoff threshold of p-values. The default value is 0.05. Variants with p-value less than or equal to this threshold will be automatically removed.

Indp_common_snp

a numeric list of independent common SNPs

Value

A K \times K matrix ζ, where K is the number of traits.

Author(s)

Lan Luo

Examples

1
2
3
4
5
6
7
8
9
data(zeta.example)
attach(zeta.example)
# Downloading independent common SNPs from 1000Genome data set.
githubURL <- "https://github.com/lan/MTAR/blob/master/indp_snps.1KG.rda?raw=true"
utils::download.file(githubURL,"1kgfile")
load("1kgfile")
zeta1 <- Get_zeta(Zscore = Zscore, Indp_common_snp = indp_snps.1KG)
zeta1
detach(zeta.example)

MTAR documentation built on April 23, 2020, 1:05 a.m.