R/postmode.R

postmode <-
function(fmodel, y, zmin = -5, zmax = 5, ...) 
{
	tmp <- optimize(function(zeta, ...) fmodel(zeta, ...)$post, 
		interval = c(zmin, zmax), maximum = TRUE, y = y, ...)
	names(tmp) <- c("zeta", "post")
	return(tmp)
}

Try the ltbayes package in your browser

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

ltbayes documentation built on May 2, 2019, 12:40 p.m.