Learn R Programming

bayesTFR (version 1.5-1)

tfr.GoF.dl: Goodness of Fit of the Double Logistic Function

Description

The function computes the ratio of observed data fitted within the given probability intervals of the predictive posterior distribution of the double logistic function.

Usage

tfr.GoF.dl(sim.dir, pi = c(80, 90, 95), burnin = 2000, verbose = TRUE)

Arguments

Value

List with the following components:totalVector of the total goodness of fit ratios, one element per probability interval.timeMatrix corresponding to the goodness of fit computed per time period. (Rows correspond to probability intervals, columns correspond to time.)countryMatrix corresponding to the goodness of fit computed per country. (Rows correspond to probability intervals, columns correspond to countries.)

See Also

DLcurve.plot

Examples

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

Run the code above in your browser using DataLab