conditional: The Conditional Distribution

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a multivariate distribution, the conditional distribution is computed when the variables with the given indices are set to the given values.

Usage

1
conditional(object, v, val)

Arguments

object

A multivariate probability distribution.

v

A vector of the indices of the variables whose values should be fixed.

val

A vector, of the same length as v, with the values at which these variables should be fixed.

Value

An object representing the conditional probability distribution.

Author(s)

Petter Mostad <mostad@chalmers.se>

See Also

marginal

Examples

1
2
3
4
5
prior <- normalexpgamma() #Generate a two-parameter flat prior
full <- linearpredict(prior, rep(1, 7)) #Normal extension
data <- simulate(uniformdistribution(), 7) #Generate data
posterior <- conditional(full, 1:7, data) #Condition on parameters
credibilityinterval(marginal(posterior, 1)) #Investigate posterior

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