ROIcoeffs {denvax}R Documentation

Compute the Return on Investment (ROI) surface coefficients from population probabilities

Description

Compute the Return on Investment (ROI) surface coefficients from population probabilities

Usage

ROIcoeffs(probabilities, As = 5:20, Ls = (diff(range(As)) + 1):1)

Arguments

probabilities

a data.frame (or data.table) with the probabilities resulting from nPxA. Rows must correspond to ages, starting with age 1

As

the starting age(s) to consider

Ls

the maximum number of tests for each age; should either be an integer per age or a single integer for all ages. The default behavior computes the number of tests (for each age) that makes the maximum of 'As' the maximum testing age Note: results will also be provided for shorter testing intervals, as the intermediate coefficients are calculated as part of computing the value at the maximum L

Details

computes the coefficients for the economic calculations

Value

a data.frame (data.table, if available) with columns:

A

integer; the age when routine test-then-vaccinate strategy starts (from As)

L

integer; the maximum number of tests for routine test-then-vaccinate strategy (from Ls)

vacfrac

numeric; the fraction of individuals participating in this strategy that get vaccinated

pri.offset

numeric; the (additive) reduction in vacfrac if using the ordinal test

Sfrac

numeric; the proportion experiencing second infection costs

Fresp

numeric; the F/S cost fraction term, when comparing vaccination with and without testing

Sgain

numeric; the S term, when comparing vaccination with and without testing

Examples

require(denvax);
data(morrison2010) # has counts by age
fit <- with(morrison2010, serofit(sero=Seropositive, N=Number, age.min=Age))
m2010pop <- synthetic.pop(fit, runs = 10, popsize = 10) # small sample size for example run time
m2010lh <- nPxA(m2010pop)
rc <- ROIcoeffs(m2010lh, As=5:10, Ls=5)
pp <- par()
par(mfrow=c(1, 2))
rcs <- subset(rc, A==10 & L < 11)
with(rcs, plot(
  L, aveTests, type="l",
  xlab="Max # of Tests Allowed",
  ylab="Ave # of Tests Administered",
  main="Starting @ Age 10",
  ylim=c(1, 3)
))
rcs <- subset(rc, A==5 & L < 11)
with(rcs, plot(
  L, aveTests, type="l",
  xlab="Max # of Tests Allowed",
  ylab="",
  main="Starting @ Age 5",
  ylim=c(1, 3)
))
par(pp)


[Package denvax version 0.1.2 Index]