posteriornormal2: Compute a Posterior Distribution for Parameters of Two Normal...

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a vectors data1 and data2 of data, this function assumes data1 is a sample from one normal distribution while data2 is a sample from another, while both distributions are assumed to have the same logged scale. The bivariate posterior for the difference between the expectations of the two distributions and the common logged scale of the distributions is computed, assuming a flat prior.

Usage

1
posteriornormal2(data1, data2)

Arguments

data1

A vector with data values. Assumed to be a sample from the first normal distribution.

data2

Another vector with data values. Assumed to be a sample from the second normal distribution.

Value

An object representing a Normal-ExpGamma distribution.

Author(s)

Petter Mostad <mostad@chalmers.se>

See Also

posteriornormal1, linearmodel

Examples

1
2
3
4
5
data1 <- simulate(normal(3.3, log(2)), 9)
data2 <- simulate(normal(5.7, log(2)), 4)
posteriornormal2(data1, data2)
marginal(linearmodel(c(data1, data2), 
designTwoGroups(length(data1), length(data2))), 2:3) #Gives same result

lestat documentation built on May 2, 2019, 2:09 p.m.