Displaying 1 result from an estimated 1 matches for "posteriorpdf".
2008 Sep 10
1
Computation of contour values - Speeding up computation
...#########################
"myContour" <- function(a, b, plist, veca, vecb, dim)
{
tmpb <- seq(0.5 * b, 1.5 * b, length=dim)
tmpa <- seq(0.5 * a, 1.5 * a, length=dim)
z <- matrix(0, nrow=dim, ncol=dim)
for(i in 1:dim)
{
for(j in 1:dim)
{
z[i, j] <- posteriorPdf(a=tmpa[j], b=tmpb[i],
plist=plist, veca=veca, vecb=vecb)
}
}
}
"posteriorPdf" <- function(a, b, plist, veca, vecb)
{
res <- sum(plist[, 1] *
exp(vecb[, 1] * log(vecb[, 2]) + (vecb[, 1] - 1.0) * log(b)
- v...