# NOT RUN {
# The following result should be approximately 75
scl <- integration.constant(uniform.like, w.lo=0, w.hi=100, a=c(75,25))
print(scl)
# Check that likelihood / scl integrates to 1.0
x <- seq(0,100,length=200)
y <- uniform.like( c(75,25), x, scale=FALSE ) / scl
int.y <- (x[2]-x[1]) * sum(y[-length(y)]+y[-1]) / 2 # the trapazoid rule, should be 1.0
print(int.y)
# }
Run the code above in your browser using DataLab