Learn R Programming

NGBVS (version 0.3.0)

asym_m_ng: Modified NG prior via FS scores

Description

Modified Normal Gamma prior calculates the posterior distribution for the fine mapping cases-controls study. The number of case-controls must be greater than the number of SNPs.

Usage

asym_m_ng (y, data, FS, medstar = c(0.01, 0.0001), numb = 100, burnin = 1, every = 1)

Value

A list including:

alpha

A vector of the posterior distribution of the intercept.

beta

A matrix of the posterior distribution of the effect sizes.

psi

A matrix of the posterior distribution of \(\psi\).

lambda

A vector of the posterior distribution of \(\lambda\).

gammasq

A vector of the posterior distribution of \(\gamma^2\).

W

A vector of the posterior distribution of \(W\).

H

A vector of the posterior distribution of \(H\).

Arguments

y

A vector of the pheontype, where takes 0s and 1s.

data

An \(N \times p\) finemap data, where \(N\) and \(p\) denote the samples and number of SNPs respectively.

FS

FS scores for each SNP and it takes value from 0 and 1 or NA for missing FS.

medstar

The value of M where M takes two values.

numb

Number of samples for each SNP.

burnin

The amount of burn-in for the MCMC sample.

every

The amount of thining for the MCMC sample.

Author

Abulaziz Alenazi.

R implementation and documentation: Abulaziz Alenazi a.alenazi@nbu.edu.sa.

Examples

Run this code
set.seed(1)
data <- matrix(sample( c( 0, 1, 2 ), 500 * 30, replace = TRUE,
prob <- c( 0.35, 0.35, 0.3)), ncol = 30 )
FS <- sample( c( 0.1, 0.5, 0.7, NA ), ncol( data ), replace = TRUE)
asym_m_ng(y = rbinom(500, 1, 0.5), data = data, FS = FS)

Run the code above in your browser using DataLab