plotposteriormapping: plot the posterier map

Description Usage Arguments Details Value Examples

View source: R/ultility.R

Description

plot the mapping between the original observations and its posterior mean

Usage

1
plotposteriormapping(x, result, result2 = NULL, ...)

Arguments

x

a vector of observations

result

an object of class nspmix to show in the top

result2

an object of class nspmix to show in the bottom. If NULL, then the density in the bottom is not drawn.

...

other parameter passed to plot

Details

This function explicity considers that map between the transformed sample correlation coefficients to the posterior mean of tanh(x) under normal cases. result typically is the mixing distribution of the transformed sample correlations and result2 is the mixing distribution on the sample correlation scale.

Value

none

Examples

1
2
3
4
5
6
n = 100; p = 50
X = matrix(rnorm(n * p), nrow = n, ncol = p)
r = cor(X)
x = makeobject(atanh(extractlower(r)), beta = 1 / sqrt(n - 3))
r1 = computemixdist(x)
plotposteriormapping(atanh(extractlower(r)), r1)

xiangjiexue/npfixedcompR documentation built on Jan. 1, 2021, 11:39 p.m.