compute_quantiles: Calculate Quantiles for Rates and Cumulative Hazard

View source: R/compute_quantiles.R

compute_quantilesR Documentation

Calculate Quantiles for Rates and Cumulative Hazard

Description

Calculate quantiles for samples of rates and cumulative hazard outputted from threemc_fit_model, and add them as columns to the shell data.frame out with estimated empirical circumcision rates.

Usage

compute_quantiles(
  out,
  fit,
  area_lev = NULL,
  probs = c(0.025, 0.5, 0.975),
  names = FALSE,
  ...
)

Arguments

out

Shell dataset with a row for every unique record in circumcision survey data for a given area. Also includes empirical estimates for circumcision estimates for each unique record.

fit

Optional "small" fit object with no sample. Specifying fit means you do not need to specify dat_tmb or parameters, as argument specifications will be overridden by those stored in fit.

area_lev

PSNU area level for specific country.

probs

Specific quantiles to be calculated, Default: c(0.025, 0.5, 0.975)

names

Parameter with quantile: logical; if true, the result has a names attribute. Set to FALSE for speedup with many probs, Default: FALSE

...

Further arguments passed to quantile.

Value

Input out data.frame, including columns with quantiles for hazard rates etc for different circumcision types, and for overall circumcision.

See Also

threemc_fit_model quantile @importFrom dplyr %>% @importFrom rlang .data


mrc-ide/threemc documentation built on Feb. 9, 2024, 5:16 p.m.