BernHierModel: Bernoulli hierarchical Beyesian model

View source: R/model.R

BernHierModelR Documentation

Bernoulli hierarchical Beyesian model

Description

Specify the parameter for hierarchical Beyesian model

Usage

BernHierModel(dat, betaA = 2, betaB = 2, numSavedSteps = 1e+05,
  burnInSteps = 4000, adaptSteps = 1000, thinSteps = 1, parallel = TRUE,
  nChains = 4, saveName = "HierModel")

Arguments

dat

input for the fucntion, should be two colums, first one is read counts of HapI, second is sum of HapI and HapII

betaA

Shape value A for prior beta distribution

betaB

Shape value B for prior beta distribution

numSavedSteps

total simulation steps

burnInSteps

number of burnin steps in MCMC

adaptSteps

number of adapting steps

thinSteps

thin used in estimating posterior distribution

parallel

should MCMC run in parallel?

nChains

number of chains used. Maximum is 4

saveName

prefix for saved Rdata file

Value

MCMC simulations results as a coda object

Note

Scripts have been modified from "Doing Bayesian Data Analysis (2nd)" by John K. Kruschke.

Examples

byesRes.A <- BernHierModel(F1.TypeA[, -1], saveName = "Family1.TypeA")

ccshao/maIHB documentation built on July 9, 2022, 3:48 p.m.