Learn R Programming

bayesLife (version 5.2-0)

e0.dl.coverage: Goodness of Fit of the Double Logistic Function

Description

The function computes coverage, i.e. the ratio of observed data fitted within the given probability intervals of the predictive posterior distribution of the double logistic function, as well as the root mean square error of the simulation.

Usage

e0.dl.coverage(sim.dir, pi = c(80, 90, 95), burnin = 10000, verbose = TRUE)

Value

List with the same components as tfr.dl.coverage.

Arguments

sim.dir

Directory with the MCMC simulation results. If a prediction and its corresponding thinned mcmcs are available in the simulation directory, those are taken for assessing the goodness of fit.

pi

Probability interval. It can be a single number or an array.

burnin

Burnin. Only relevant if sim.dir does not contain thinned chains.

verbose

Logical switching log messages on and off.

Author

Hana Sevcikova

See Also

e0.DLcurve.plot

Examples

Run this code
if (FALSE) {
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output")
e0 <- get.e0.mcmc(sim.dir)
# Note that this simulation is a toy example and thus has not converged.
gof <- e0.dl.coverage(sim.dir)
gof$country.coverage
e0.DLcurve.plot(e0, country=608, predictive.distr=TRUE, pi=c(80, 90, 95))
}

Run the code above in your browser using DataLab