gibbser2: Gibbs Sampler

Description Usage Arguments Value References See Also Examples

Description

This function computes the Gibbs sampler routine for the situation described in Example 11.3.2 on page 677. The input parameter alpha is the parameter in the joint distribution of the random vector (X, Y) which is given in the example. The value of m is the number of initial runs of the sampler for achieving equilibrium, then the next (n * m) runs are recorded and returned in the R vectors x2 and y2. The paired items (x2,i) & (y2,i) are the variates for random vector (X, Y).

Usage

1
gibbser2(alpha = 0, m = 0, n = 0)

Arguments

alpha

test statistic applied in algorithm

m

length of returned variables x1 and y1

n

length of returned variables x2 and y2

Value

A list of two streams of iid random variables. The first pair is of length m and the second of length n.

References

Hogg, R., McKean, J., Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.

See Also

gibbser3() for more details on Monte Carlo techniques used for integrating in Bayesian inference

Examples

1
2
gibbser2(alpha = 10, m = 30, n = 60)
gibbser2(alpha = 12, m = 40, n = 100)

austinragotzy/mathstat documentation built on May 13, 2019, 11:30 a.m.