tSample: tSample

Description Usage Arguments Examples

Description

Samples the posterior distribution of a compound's activity according to:

data ~ dt(mu, tau, nu)
mu ~ dt(mu.prior, tau.prior, nu.prior)
tau ~ dgamma(a, b)
nu ~ dexp(lambda)

The sampling is done by MCMC via autorun.jags.

Usage

1
2
tSample(data, mu.prior, var.prior, nu.prior, a, b, lambda = 1/29,
  runjags.method = "rjparallel")

Arguments

data

list of compound activity data

mu.prior

location parameter for prior distribution of mu, typically the average of all compound activity.

var.prior

spread parameter for prior distribution of mu, typically the square standard error of the mean for all compounds.

a

alpha parameter for prior distribution of compound variance. See EstimateAB.

b

beta parameter for prior distribution of compound variance. See EstimateAB.

lambda

paramater for normality of t-distribution. Defaults to 1/29. Based on the Bayesian Estimation Superseeds T-test http://www.indiana.edu/~kruschke/BEST/BEST.pdf.

runjags.method

method by which jags is run, default is rjparallel

Examples

1
2
3
4
5
6
7
8
9
compound <- rnorm(2, 100, 10)
mu.prior <- 0
var.prior <- 100
nu.prior <- 1
a <- 30
b <- 3100
posterior <- tSample(compound, mu.prior, var.prior, nu.prior, a, b)
hist(posterior$mu, 100)
hist(posterior$tau, 100)

BenjaminChittick/BenCScore documentation built on May 5, 2019, 2:41 p.m.