View source: R/durations.hpd.R
durations.hpd | R Documentation |
Simple HPD calculator from Chapter 2 (page 51, 2nd Edition).
durations.hpd(support,fn.eval,start,stop,target=0.90,tol=0.01)
support |
x-axis values |
fn.eval |
function values at x-axis points |
start |
starting point in the vectors |
stop |
stoppng point in the vectors |
target |
Desired X Level |
tol |
Tolerance for round-off |
Jeff Gill
## Not run: get("cabinet.duration") ruler <- seq(0.45,0.75,length=10000) g.vals <- round(dgamma(ruler,shape=sum(cabinet.duration$N), rate=sum(cabinet.duration$N*cabinet.duration$dur)),2) start.point <- 1000; stop.point <- length(g.vals) durations.hpd(ruler,g.vals,start.point,stop.point) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.