Primo_missdata_tstat: Estimate posterior probabilities for observations missing...

Description Usage Arguments Value

View source: R/processing.R

Description

For each observation (e.g. SNP), estimates the posterior probability for each association pattern. Uses parameters estimated by a previous run of Primo_tstat or Primo_modT to estimate probabilities for SNPs missing in one or more studies. Utilizes parallel computing, when available.

Usage

1
2
Primo_missdata_tstat(betas, sds, dfs, trait_idx, mafs = NULL, N = NULL,
  pis, Gamma, prior_df, prior_var, unscaled_var, par_size = 1)

Arguments

betas

matrix of coefficient estimates.

sds

matrix of standard errors (for coefficient estimates).

dfs

vector or matrix of degrees of freedom.

trait_idx

integer vector of the columns corresponding to non-missing phenotypes/studies.

mafs

vector or matrix of minor allele frequencies (MAFs). If NULL, error variances will not be adjusted for MAF.

N

vector or matrix of number of subjects. Should be specified if mafs!=NULL.

pis

vector of the estimated proportion of observations belonging to each association pattern.

Gamma

correlation matrix.

prior_df

vector of the prior degrees of freedom for each marginal distribution.

prior_var

vector of the prior variance estimators for each marginal distribution.

unscaled_var

vector of the unscaled variance priors on non-zero coefficients for each marginal distribution.

par_size

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

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.
Tstat_mod matrix of moderated t-statistics.
V_mat matrix of scaling factors under the alternative distribution.
mdf_sd_mat matrix of standard deviation adjustment according to moderated degrees of freedom:sqrt(df/(df-2)).
prior_df vector of the prior degrees of freedom for each marginal distribution.
prior_var vector of the prior variance estimators for each marginal distribution.
unscaled_var vector of the unscaled variance priors on non-zero coefficients for each marginal distribution.

The main 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, 5:21 p.m.