Learn R Programming

vacem (version 0.1-1)

get.prob.vacc: Calculates the vaccination probability for all individuals in a group...

Description

Calculates the vaccination probability for all individuals in a group of observations and under a described set of vaccination activities (e.g. campaigns).

Usage

get.prob.vacc(obs, camps, trans.rho, alpha, z, w, cdf.fun, ...)

Arguments

obs
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)
trans.rho
the log-odds (aka logit) of @c rho, the proportion of the population (scalar) that can be vaccinated; see note above
alpha
the vaccination efficiency parameter (scalar) for the campaign; @codealpha = -inf implies perfect efficiency, @codealpha = 0 implies random efficiency; see note above
z
the eligibility matrix for each individual/campaign pairing, i.e. @codez[i,j] = 1 if this individual @c i is eligible for campaign @c j, otherwise @codez[i,j] = 0; Note: if @c z is @c NULL, then the eligibilty matrix is calculated from @p obs and @p camps parameters using @code z.matrix function.
w
the weight matrix for each individual/campaign pairing, i.e. @code w[i,k] gives the probability of individual @c i receiving a routine vaccination in year @c k Note: if @c w is @c NULL, then the weight matrix is calculated from @p obs, @p camps, @p cdf.fun and @p ... parameters using @code w.matrix function.
cdf.fun
a cumulative distribution function (CDF) used to calculate the probability of routine vaccination based upon age, e.g. @code constant.post.9mo . Note: this parameter is only required if the weight matrix, @p w, is not provided.
...
any additional arguments to the @p cdf.fun, e.g. @c lambda Note: this parameter is only required if the weight matrix, @p w, is not provided.

Value

individual in observations data frame, @p obs.@see g @see z.matrix @see w.matrix @see nine.month.pointmass @see constant.post.9mo

Details

The @c get.prob.vacc function simply applies the @code g function to all the entries in observations data frame, @p obs. The @p obs argument should contain the immunization information as derived, for example, from a Demographic and Health Survey (DHS). The @c get.prob.vacc function uses the observations and vaccination activity descriptions, @p camps, to calculate the eligibility matrix, @code z.matrix and the weight matrix @code w.matrix , if not provided. Then the vaccination probabilities are calculated by calling @c g with each individual's eligibility and weight vector as well as the relevant vaccination activity information (i.e. @p camps$N and @p camps$v), the efficiency parameter (@p alpha) and the accessibility multiplier (@c rho).