tContrast: tContrast

Description Usage Arguments Examples

Description

Wraps the tSample function and compares its markov chain to a provided null markov chain. Returns estimated mean, standard deviation, and probability of belonging to the null posterior.

Usage

1
2
tContrast(data, mu.prior, var.prior, nu.prior, a, b, null.post, ROPE,
  alternative, runjags.method = "rjparallel")

Arguments

data

activity data for a compound

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.

null.post

a MCMC sampling of a null posterior with column name mu.

alternative

a character string specifying the relationship to the null posterior, must be one of "two.sided", "greater", or "less".

runjags.method

method by which jags is run, default is rjparallel

rope

Region of Practical Equivalence. This value specifies how close the sampled posterior needs to be to the null posterior to consider them equivalent, default value is 0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
compound <- rnorm(2, 100, 10)
null.reference <- rnorm(320, 0, 10)
pooled <- c(compound, null.reference)
mu.prior <- median(pooled)
var.prior <- var(pooled)
nu.prior <- 1
a <- 30
b <- 3100
ROPE <- 15
null.post <- tSample(null.reference, mu.prior, var.prior, nu.prior, a, b)
posterior <- tContrast(compound, mu.prior, var.prior, nu.prior, a, b, 
                       null.post, ROPE, alternative='greater')
posterior

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