rfyzstar: Conditional posterior distribution of the distict vectors...

Description Usage Details Examples

View source: R/rfyzstar.R

Description

This function evaluates the ratio of conditional posterior distributions of the distict latent vectors (Ystar,Zstar).

Usage

1
2
rfyzstar(v, v2, z, z2, x, distr.k, distr.py0, mu.py0, sigma.py0, distr.pz0, 
            mu.pz0, sigma.pz0)

Details

For internal use.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## The function is currently defined as
function (v, v2, z, z2, x, distr.k, distr.py0, mu.py0, sigma.py0, distr.pz0, mu.pz0, sigma.pz0)
{
    alpha <- p0(v, distr = distr.py0, mu = mu.py0, sigma = sigma.py0) /
             p0(v2, distr = distr.py0, mu = mu.py0, sigma = sigma.py0) *
             p0(z, distr = distr.pz0, mu = mu.pz0, sigma = sigma.pz0) /
             p0(z2, distr = distr.pz0, mu = mu.pz0, sigma = sigma.pz0)
    Prod <- 1
    for (i in seq(length(x))) {
        fac <- dk(x[i], distr = distr.k, mu = v, sigma = z)/dk(x[i], 
            distr = distr.k, mu = v2, sigma = z2)
        Prod <- Prod * fac
    }
    f <- alpha * Prod
    return(f)
  }

BNPdensity documentation built on May 19, 2017, 8:20 p.m.

Search within the BNPdensity package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.