jam_wrap: Wrapper around 'JAM'

Description Usage Arguments Value

View source: R/functions.R

Description

Constructs a collated list of data that can be passed to JAM via do.call, or as an argument to cojam. The prior proportion of causal covariates is treated as unknown and given a Beta(a, b) hyper-prior.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
jam_wrap(
  marginal_beta,
  snp_names,
  ref_genotypes,
  n,
  trait_variance,
  binary_outcome = FALSE,
  marginal_beta_se = NULL,
  bb_prior_a = 1,
  bb_prior_b = NULL,
  ...
)

Arguments

marginal_beta

Vector of marginal effect estimates to re-analyse with JAM under multivariate models. For GWAS summaries, these or log-ORs.

snp_names

SNP identifiers (e.g. RSID), in the same order as marginal_beta.

ref_genotypes

Reference genotype matrix used by JAM to impute the SNP-SNP correlations. Genotypes must be coded as a numeric risk allele count 0/1/2. Non-integer values reflecting imputation may be given. NB: The risk allele coding must correspond to that used in marginal.betas. Must be positive definite, with SNP identifiers in the column names.

n

The size of the dataset in which the summary statistics marginal.betas were calculated

trait_variance

Estimate of the trait (outcome) variance.

binary_outcome

Is the trait (outcome) binary? Should be TRUE for GWAS or FALSE for QTL studies.

marginal_beta_se

Only required if the trait (outcome) is binary: standard errors of the log-ORs.

bb_prior_a

Parameter of Beta(a, b) prior on proportion of causal covariates, default 1.

bb_prior_b

Parameter of Beta(a, b) prior on proportion of causal covariates. Default is the number of SNPs that are common to both snp_names and colnames(ref_genotypes). Higher values of bb_prior_b relative to bb_prior_a will encourage greater sparsity. Use GetBetaBinomParams for suggested beta-binomial parameters.

...

Other arguments to JAM.

Value

A collated list of data that can be passed to JAM via do.call.


simisc/cojam documentation built on Dec. 31, 2020, 7:26 a.m.