initializeMCMCObject {AnaCoDa}R Documentation

Initialize MCMC

Description

initializeMCMCObject initializes a MCMC object to perform a model fitting for a parameter and model object.

Usage

initializeMCMCObject(
  samples,
  thinning = 1,
  adaptive.width = 100,
  est.expression = TRUE,
  est.csp = TRUE,
  est.hyper = TRUE,
  est.mix = TRUE
)

Arguments

samples

Number of samples to be produced when running the MCMC algorithm. No default value.

thinning

The thinning interval between consecutive observations. If set to 1, every step will be saved as a sample. Default value is 1.

adaptive.width

Number that determines how often the acceptance/rejection window should be altered. Default value is 100 samples. Proportion of MCMC steps where the proposal distribution is adaptive can be set using mcmc$setStepsToAdapt. The default parameter passed in as -1 uses the full iterations.

est.expression

Boolean that tells whether or not synthesis rate values should be estimated in the MCMC algorithm run. Default value is TRUE.

est.csp

Boolean that tells whether or not codon specific values should be estimated in the MCMC algorithm run. Default value is TRUE.

est.hyper

Boolean that tells whether or not hyper parameters should be estimated in the MCMC algorithm run. Default value is TRUE. Setting for expression noise parameter sepsilon can be overridden by setting fix.observation.noise in initializeModelObject()

est.mix

Boolean that tells whether or not the genes' mixture element should be estimated in the MCMC algorithm run. Default value is TRUE.

Details

initializeMCMCObject sets up the MCMC object (monte carlo markov chain) and returns the object so a model fitting can be done. It is important to note that est.expression and est.hyper will affect one another negatively if their values differ.

Value

mcmc Returns an intialized MCMC object.

Examples


## initializing an object of type mcmc

samples <- 2500
thinning <- 50
adaptiveWidth <- 25

## estimate all parameter types
mcmc <- initializeMCMCObject(samples = samples, thinning = thinning, adaptive.width=adaptiveWidth, 
                             est.expression=TRUE, est.csp=TRUE, est.hyper=TRUE, est.mix = TRUE) 
                             
## do not estimate expression values, initial conditions will remain constant
mcmc <- initializeMCMCObject(samples = samples, thinning = thinning, adaptive.width=adaptiveWidth, 
                             est.expression=FALSE, est.csp=TRUE, est.hyper=TRUE, est.mix = TRUE) 
                             
## do not estimate hyper parameters, initial conditions will remain constant
mcmc <- initializeMCMCObject(samples = samples, thinning = thinning, adaptive.width=adaptiveWidth, 
                             est.expression=TRUE, est.csp=TRUE, est.hyper=FALSE, est.mix = TRUE) 


[Package AnaCoDa version 0.1.4.4 Index]