post: Compute posterior for association mapping

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/inference.R

Description

Compute posterior for association mapping.

Usage

1
post(data, X = NULL, id, LPMfit)

Arguments

data

A list of dataframes which contains SNP IDs and p-values for the target GWASs, the length is the number of GWASs considered.

X

Design matrix of functional annotations without intercept, where row and column correspond to SNP and annotation, respectively. Default is NULL.

id

ID of the GWASs considered, the length can be 1, 2 and 3. For example, id = c(1, 3) means we consider the first and the third GWAS in data.

LPMfit

LPM model fit.

Details

post compute posterior for association mapping.

Value

If the length of id is 1, the value includes

posterior

The posteriors that each SNP is associated with the target GWAS.

If the length of id is 2, the value includes

post.joint

The posteriors that each SNP is associated with both the two target GWASs.

post.marginal1

The posteriors that each SNP is associated with only the first target GWAS.

post.marginal2

The posteriors that each SNP is associated with only the second target GWAS.

If the length of id is 2, the value includes

post.joint

The posteriors that each SNP is associated with all the three target GWASs.

post.marginal1

The posteriors that each SNP is associated with only the first target GWAS.

post.marginal2

The posteriors that each SNP is associated with only the second target GWAS.

post.marginal3

The posteriors that each SNP is associated with only the third target GWAS.

post.marginal12

The posteriors that each SNP is associated with both the first and the second target GWAS.

post.marginal13

The posteriors that each SNP is associated with both the first and the third target GWAS.

post.marginal23

The posteriors that each SNP is associated with both the second and the third target GWAS.

Author(s)

Jingsi Ming

See Also

LPM, assoc

Examples

1
2
3
4
5
data(ExampleData)

posterior1 <- post(ExampleData$data[1], X = ExampleData$X, id = 1, LPMfit)

posterior13 <- post(ExampleData$data[c(1, 3)], X = ExampleData$X, id = c(1, 3), LPMfit)

mingjingsi/LPM documentation built on April 2, 2020, 9:32 a.m.