Primo: Estimate posterior probabilities of association patterns.

Description Usage Arguments Details Value

View source: R/main.R

Description

For each observation (e.g. SNP), estimate the posterior probability for each association pattern. This function calls either the t-statistic (Primo_tstat) or P-value (Primo_pval) version of Primo. Utilizes parallel computing, when available. For package documentation, see Primo-package.

Usage

1
2
3
Primo(betas = NULL, sds = NULL, dfs = NULL, pvals = NULL,
  alt_props, mafs = NULL, N = NULL, Gamma = NULL, tol = 0.001,
  par_size = 1, use_method = "tstat")

Arguments

betas

matrix of coefficient estimates.

sds

matrix of standard errors (for coefficient estimates).

dfs

vector or matrix of degrees of freedom.

pvals

matrix of P-values.

alt_props

vector of the proportions of test statistics from the alternative densities.

mafs

vector or matrix of minor allele frequencies (MAFs).

N

vector or matrix of number of subjects.

Gamma

correlation matrix.

tol

numeric value specifying the tolerance threshold for convergence.

par_size

numeric value specifying the number of workers for parallel computing (1 for sequential processing).

use_method

character string denoting which method to use. Must be one of "tstat" or "pval".

Details

The following are additional details describing the input arguments (for m SNPs/observations measured in d studies):

Value

A list with the following elements:

post_prob matrix of posterior probabilities (each column corresponds to an association pattern).
pis vector of estimated proportion of observations belonging to each association pattern.
D_mat matrix of densities under each association pattern.
Gamma correlation matrix.

The primary element of interest for inference is the posterior probabilities matrix, post_prob. The estimated proportion of observations belonging to each association pattern, pis, may also be of interest. The remaining elements are returned primarily for use by other functions.


kjgleason/Primo documentation built on Sept. 7, 2021, 3:58 a.m.