contrast: Computing the distribution of a Contrast

Description Usage Arguments Value Author(s) Examples

Description

For some distributions, like the multivariate Normal-ExpGamma and the multivariate Normal-Gamma, a new distribution is constructed from a linear combination of all but the last variables, and the last variable.

Usage

1
contrast(object, v)

Arguments

object

A multivariate Normal-ExpGamma distribution or multivariate Normal-Gamma distribution.

v

A vector specifying the linear combination.

Value

A Normal-ExpGamma distribution or a Normal-Gamma distribution, depending on the input.

Author(s)

Petter Mostad <mostad@chalmers.se>

Examples

1
2
3
4
5
6
data1 <- simulate(normal(13, log(0.4)), 3)
data2 <- simulate(normal(14, log(0.4)), 5)
data3 <- simulate(normal(12, log(0.4)), 6)
dist <- linearmodel(c(data1, data2, data3), designManyGroups(c(3,5,6)))
diff <- contrast(dist, c(0, 1, -1))
credibilityinterval(marginal(diff, 1))

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