DPTreePosterior {DPtree}R Documentation

D-P tree posterior updating from a single copula observation.

Description

DPTreePosterior returns the D-P tree posterior given input copula data.

Usage

DPTreePosterior(x, prior, w = 1)

Arguments

x

An array of length 2. Single copula data observation. Each element should be between 0 and 1.

prior

A list. Should be in same format as returned from DPTreePrior.

w

A positive number. Weight of data for posterior updating. Default 1.

Value

A list.

a

An array containing the hyperparameters of D-P trees.

References

Ning S and Shephard N (2018). “A nonparametric Bayesian approach to copula estimation.” Journal of Statistical Computation and Simulation, 88(6), pp. 1081-1105. doi: 10.1080/00949655.2017.1421194.

Examples

nsim = 1
rho = 0.9
data1 <- MASS::mvrnorm(n=nsim, mu=rep(0, 2), Sigma=matrix(c(1, rho, rho, 1), 2, 2))
data2 <- stats::pnorm(data1)
DPTreePosterior(x=data2, prior=DPTreePrior(m=4, z=1))

[Package DPtree version 1.0.1 Index]