B2mean: Bayesian comparison of two means

View source: R/B2mean.r

B2meanR Documentation

Bayesian comparison of two means

Description

Bayesian comparison of two means

Usage

B2mean(
  var1,
  var2,
  n.iter = 11000,
  n.burnin = 1000,
  n.thin = 1,
  prior.norm = c(0, 0.001, 0, 0.001),
  prior.gamma = c(0.5, 0.5, 0.5, 0.5)
)

Arguments

var1

variable 1

var2

= variable 2

n.iter

number of iteration

n.burnin

number of iteration used in the update of the model

n.thin

n thin

prior.norm

normal parameters for priors of means 1 and 2 - two parameters each (mean, precision)

prior.gamma

gamma parameters for priors of tau 1 and tau 2 - two parameters each (shape, rate)

Details

precision is the inverse of variance

Value

list with Stats (descriptive stats) and MCMC (inference)

Author(s)

JuG

Examples

x <- rnorm(200, 2.1, .4)
y <- rnorm(200, 2, .4)
B2mean(var1=x, var2=y)


jgodet/utilitR documentation built on May 16, 2024, 12:01 p.m.