ROIcoeffs: Compute the Return on Investment (ROI) surface coefficients...

Description Usage Arguments Details Value Examples

View source: R/main.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)

denvax documentation built on Dec. 2, 2019, 1:09 a.m.