R/calc_muX.R

calc_muX <-
function (muY, a, b) 
{
  muX <- 0 * muY
  muX[1] <- 1
  for (j in 1:(length(muY) - 1)) {
    k <- 0:j
    muX[j + 1] <- sum(choose(j, k) * 2^k * muY[k + 1] *
                        (-1)^(j - k) * (a + b)^(j - k))/(b - a)^j
  }
  return(muX)
}

Try the MaskJointDensity package in your browser

Any scripts or data that you put into this service are public.

MaskJointDensity documentation built on May 2, 2019, 8:28 a.m.