brewOne: Run BEER for one sample

View source: R/brew.R

brewOneR Documentation

Run BEER for one sample

Description

This function is not really for external use. It's exported for parallelization purposes. For more detailed descriptions see brew.

Usage

brewOne(
  object,
  sample,
  prior.params,
  n.chains = 1,
  n.adapt = 1000,
  n.iter = 10000,
  thin = 1,
  na.rm = TRUE,
  ...,
  seed = as.numeric(format(Sys.Date(), "%Y%m%d"))
)

Arguments

object

PhIPData object

sample

sample name

prior.params

vector of prior parameters

n.chains

number of chains to run

n.adapt

number of iterations to use as burn-in.

n.iter

number of iterations for the MCMC chain to run (after n.adapt)

thin

thinning parameter

na.rm

what to do with NA values (for JAGS)

...

extra parameters for JAGS

seed

number/string for reproducibility purposes.

Value

nothing, saves the the results to an RDS in either a temp directory or the specified directory.

Examples

sim_data <- readRDS(system.file("extdata", "sim_data.rds", package = "beer"))

beads_prior <- getAB(subsetBeads(sim_data), "edgeR")
brewOne(sim_data, "9", list(
    a_0 = beads_prior[["a_0"]],
    b_0 = beads_prior[["b_0"]],
    a_pi = 2, b_pi = 300,
    a_phi = 1.25, b_phi = 0.1,
    a_c = 80, b_c = 20,
    fc = 1
))

athchen/beer documentation built on July 2, 2022, 10:35 p.m.