e0.dl.coverage {bayesLife}R Documentation

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)

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.

Value

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

Note

To see the fit visually per country, use e0.DLcurve.plot(..., predictive.distr=TRUE,...).

Author(s)

Hana Sevcikova

See Also

e0.DLcurve.plot

Examples

## Not run: 
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))

## End(Not run)

[Package bayesLife version 5.2-0 Index]