R/groupeddatapost.R

groupeddatapost=function (theta, data) 
{
    dj=function(f,int.lo,int.hi,mu,sigma)
      f*log(pnorm(int.hi,mu,sigma)-pnorm(int.lo,mu,sigma))
    mu = theta[1]
    sigma = exp(theta[2])
    sum(dj(data$f,data$int.lo,data$int.hi,mu,sigma))
}

Try the LearnBayes package in your browser

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

LearnBayes documentation built on May 1, 2019, 7:03 p.m.