Conditional density evaluation in the fully nonparametric model

Share:

Description

This function evaluates a density path conditionally on a posterior realization of the normalized measure.

Usage

1
fcondXA2(x, distr, Tauy, Tauz, J)

Details

For internal use.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## The function is currently defined as
function (x, distr = 1, Tauy, Tauz, J) 
{
    pJ <- J/sum(J)
    K <- matrix(NA, nrow = length(Tauy), ncol = length(x))
    for (i in seq(Tauy)) {
        K[i, ] <- dk(x, distr = distr, mu = Tauy[i], sigma = Tauz[i])
    }
    fcondXA2 <- apply(K, 2, function(x) sum(x * pJ))
    return(fcondXA2)
  }

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.