Learn R Programming

vacem (version 0.1-1)

vaccinate.sample.pop: Vaccinates a sample population based on probabilities generated from the...

Description

Vaccinates a sample population based on probabilities generated from the campaigns descriptions and the @p rho and @p alpha values.

Usage

vaccinate.sample.pop(obs, camps, rho, alpha, cdf.fun, ...)

Arguments

obs
the synthetic population, i.e. a data frame with one row per observation and columns for @c date of observation and @c age of individual on that date; Note: all ages should be in months
camps
a data frame with one row per activity and columns providing the activity's @c date, targeted age range (@c age.low and @c age.high), size of targeted population (@c N) and the number of vaccine doses nominally distributed (@c v)
rho
the proportion of the population (scalar) that can be vaccinated, i.e @code1 - rho is the @e inaccessible portion of the general population.
alpha
the vaccination efficiency parameter (scalar) for the campaign; @codealpha = -inf implies perfect efficiency, @codealpha = 0 implies random efficiency; see note above
cdf.fun
a cumulative distribution function (CDF) used to calculate the probability of routine vaccination based upon age, e.g. @code constant.post.9mo .
...
any additional arguments to the @p cdf.fun, e.g. @c lambda

Value

@c y (vaccination status, i.e. @c 0 or @c 1) and @c p.vac (vaccination probability)@see g @see z.matrix @see w.matrix @see nine.month.pointmass @see constant.post.9mo

Details

TBD: Add details

Examples

Run this code
dates <- as.Date( c( "2005-05-01", "2007-07-02", "2009-09-03" ) )
sample.obs   <- make.sample.pop( N=N, age.low=0, age.high=25,
date=array(dates,dim=N) )
sample.camps <- data.frame( date=(dates - 3*DAYS.PER.MONTH),
N=(0.5*N), v=(0.5*N),
age.low=8, age.high=20, is.SIA=1 )

vaccinate.sample.pop( sample.obs, sample.camps, rho=0.9, alpha=0,
cdf.fun=nine.month.pointmass )

Run the code above in your browser using DataLab