Learn R Programming

bayesTFR (version 6.1-2)

summary.bayesTFR.prediction: Summary of a Prediction of the Total Fertility Rate

Description

Country-specific summary of an object of class bayesTFR.prediction, created using the function tfr.predict. The summary contains the mean, standard deviation and several commonly used quantiles of the simulated trajectories.

Usage

# S3 method for bayesTFR.prediction
summary(object, country=NULL, compact = TRUE, …)

Arguments

object

Object of class bayesTFR.prediction.

country

Country name or code. If it is NULL, only prediction parameters are included.

compact

Logical switching between a smaller and larger number of displayed quantiles.

A list of further arguments.

See Also

bayesTFR.prediction

Examples

Run this code
# NOT RUN {
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
pred <- tfr.predict(sim.dir=sim.dir, 
                    output.dir=file.path(getwd(), "exampleTFRpred"), 
                    use.tfr3=FALSE, burnin=15, verbose=TRUE)
# If the above function was run previously, do
# pred <- get.tfr.prediction(sim.dir=file.path(getwd(), "exampleTFRpred"))
                                                        
summary(pred, country="Ireland")
# }

Run the code above in your browser using DataLab