BASiCS_PriorParam: Prior parameters for BASiCS_MCMC

View source: R/BASiCS_PriorParam.R

BASiCS_PriorParamR Documentation

Prior parameters for BASiCS_MCMC

Description

This is a convenience function to allow partial specification of prior parameters, and to ensure default parameters are consistent across usage within the package.

Usage

BASiCS_PriorParam(
  Data,
  k = 12,
  mu.mu = NULL,
  s2.mu = 0.5,
  s2.delta = 0.5,
  a.delta = 1,
  b.delta = 1,
  p.phi = rep(1, times = ncol(Data)),
  a.s = 1,
  b.s = 1,
  a.theta = 1,
  b.theta = 1,
  RBFMinMax = TRUE,
  FixLocations = !is.null(RBFLocations) | !is.na(MinGenesPerRBF),
  RBFLocations = NULL,
  MinGenesPerRBF = NA,
  variance = 1.2,
  m = numeric(k),
  V = diag(k),
  a.sigma2 = 2,
  b.sigma2 = 2,
  eta = 5,
  PriorMu = c("default", "EmpiricalBayes"),
  PriorDelta = c("log-normal", "gamma"),
  StochasticRef = TRUE,
  ConstrainProp = 0.2,
  GeneExponent = 1,
  CellExponent = 1
)

Arguments

Data

SingleCellExperiment object (required).

k

Number of regression terms, including k - 2 Gaussian radial basis functions (GRBFs).

mu.mu, s2.mu

Mean and variance parameters for lognormal prior on mu.

s2.delta

Variance parameter for lognormal prior on delta when PriorDelta="lognormal".

a.delta, b.delta

Parameters for gamma prior on delta when PriorDelta="gamma".

p.phi

Parameter for dirichlet prior on phi.

a.s, b.s

Parameters for gamma prior on s.

a.theta, b.theta

Parameters for gamma prior on theta.

RBFMinMax

Should GRBFs be placed at the minimum and maximum of log(mu)?

FixLocations

Should RBFLocations be fixed throughout MCMC, or adaptive during burn-in? By default this is FALSE, but it is set to TRUE if RBFLocations or MinGenesPerRBF are specified.

RBFLocations

Numeric vector specifying locations of GRBFs in units of log(mu).

MinGenesPerRBF

Numeric scalar specifying the minimum number of genes for GRBFs to be retained. If fewer than MinGenesPerRBF genes have values of log(mu) within the range of an RBF, it is removed. The range covered by each RBF is defined as centre of the RBF plus or minus half the distance between RBFs.

variance

Variance of the GRBFs.

m, V

Mean and (co)variance priors for regression coefficients.

a.sigma2, b.sigma2

Priors for inverse gamma prior on regression scale.

eta

Degrees of freedom for t distribution of regresion errors.

PriorMu

Indicates if the original prior (PriorMu = 'default') or an empirical Bayes approach (PriorMu = 'EmpiricalBayes') will be assigned to gene-specific mean expression parameters.

PriorDelta

Scalar character specifying the prior type to use for delta overdispersion parameter. Options are "log-normal" (recommended) and "gamma" (used in Vallejos et al. (2015)).

StochasticRef

Logical scalar specifying whether the reference gene for the no-spikes version should be chosen randomly at MCMC iterations.

ConstrainProp

Proportion of genes to be considered as reference genes if StochasticRef=TRUE.

GeneExponent, CellExponent

Exponents for gene and cell-specific parameters. These should not be outside of divide and conquer MCMC applications.

Value

A list containing the prior hyper-parameters that are required to run the algoritm implemented in BASiCS_MCMC.

Examples


BASiCS_PriorParam(makeExampleBASiCS_Data(), k = 12)



catavallejos/BASiCS documentation built on March 27, 2024, 12:49 a.m.