rfystar: Conditional posterior distribution of the distict Ystar

Description Usage Details Examples

Description

This function evaluates the ratio of conditional posterior distributions of the distict latents Ystar.

Usage

1
rfystar(v, v2, x, distr.k, sigma.k, distr.p0, mu.p0, sigma.p0)

Details

For internal use.

Examples

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


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

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

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

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