#' @title Print fitIncidence
#' @description Prints a brief summary of a fitIncidence object.
#' @rdname print
#' @method print fitIncidence
#' @keywords internal
#' @export
print.fitIncidence <- function(x, ...) {
if (x$fit$convergence)
cat("Did not converge!\n\n")
cat("Fit the following parameters:\n")
print(unlist(x$parameters.fitted))
cat("\n")
cat("Reference attack rates are:", "\n")
cat(paste0(round(100*x$parameters.internal$attackRatesToMatch, 2), "%"), "\n")
cat("Calculated attack rates are:", "\n")
cat(paste0(round(100*getInfections(x$model, symptomatic = x$parameters.internal$symptomaticIncidence, fractionSymptomatic = x$parameters.internal$fractionSymptomatic, asRate = TRUE) /
x$model$parameters$populationFractions, 2), "%"), "\n")
cat("\nThe model is:\n")
print(x$model)
cat("Reference seriological rate:",
round(100*sum(x$parameters.internal$incidence$incidence / x$parameters.fixed$population) /
ifelse(x$parameters.internal$symptomaticIncidence,
x$parameters.internal$fractionSymptomatic,
1), 2), "%")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.