CaptureTB outpatient visit cost model
unitcost.RdThis function loads a JAGSModel model object
fitted using default covariates and priors, with
a total of 30,000 posterior samples. This can be used to
predict the total cost of a single outpatient visit at
a given facility or facilities via the predict method.
Value
An object of class JAGSModel.
Details
Note that some covariates are centered. The function
prepare_covariates() can be used to transform raw variables
using the correct centering values.
Examples
mod <- unitcost()
#> Multiple outputs detected. Including output-level random effects in model.
new_data <- list(
log_ID_p_bldgspace = 1,
logVisits = 6.9,
logVisitsPP_TB = -1.29,
primary = TRUE,
secondary = FALSE,
tertiary = FALSE,
urban = FALSE,
public = TRUE,
n_services = 3,
fc_country = "Ethiopia",
output = "op_treatmentvisit"
)
new_covariates <- prepare_covariates(new_data, mod)
mod$predict(new_covariates, summarised = TRUE)
#> Summary of Posterior Distribution
#>
#> Observation | Mean | 95% CI
#> ---------------------------------
#> 1 | 2.86 | [1.68, 4.05]