parameters_credible_intervals: Analyse a FOIfit

View source: R/parameters_credible_intervals.R

parameters_credible_intervalsR Documentation

Analyse a FOIfit

Description

Determines the mean and quantiles of the parameters estimated in the fit. By default, it returns the mean, the median and 95 % credible interval of the parameters.

Usage

parameters_credible_intervals(FOIfit, quants = c(0.025, 0.5, 0.975))

Arguments

FOIfit

An object of the class FOIfit.

quants

Numeric. Contains the list of the estimated quantiles given between 0 and 1. Default parameters are the 2.5%, 50 % and 97.5 % quantiles given by quants = c(0.025,0.5,0.975).

Value

A dataframe containing the 2.5 In the case of an outbreak model (outbreak or outbreak+constant), the total force of infection is given by alpha, and the probability of infection by "Outbreak Prob. Inf.". For models with constant phases, the annual probability of infection is given.

Author(s)

Nathanael Hoze nathanael.hoze@gmail.com

Examples

  
 data("1peakSimulation")
 model <- FOImodel(type='outbreak', seroreversion=TRUE, K=1)
 options(mc.cores = parallel::detectCores())
 Fit <- fit(data = data, model = model)
 parameters_credible_intervals(Fit)

# an example where other quantiles are specified
 data("1peakSimulation")
 model <- FOImodel(type='outbreak', seroreversion=TRUE, K=1)
 options(mc.cores = parallel::detectCores())
 Fit <- fit(data = data, model = model)
 parameters_credible_intervals(Fit, quants=c(0.25,0.5,0.75))


nathoze/Rsero documentation built on Dec. 1, 2024, 6:39 p.m.