Learn R Programming

vacem (version 0.1-1)

w.matrix: Creates a weight matrix from (1) immunization information for a set...

Description

Creates a weight matrix from (1) immunization information for a set of individuals, e.g. observations derived from a Demographic and Health Survey (DHS), (2) a set of vaccination activity descriptions, and (3) a cumulative distribution function (CDF).

Usage

w.matrix(obs, activities, cdf.fun, ...)

Arguments

obs
a data frame with one row per observation and columns for date of observation and age of individual on that date; Note: all ages should be in months
activities
a data frame with one row per activity and columns providing the activity's date and the @c is.SIA flag indicating whether the activity is a Supplemental Immunization Activity (SIA) or routine vaccination.
cdf.fun
a cumulative distribution function (CDF) used to calculate the probability of routine vaccination during each activity as a function of age, e.g. @code constant.post.9mo .
...
additional arguments to the @p cdf.fun, e.g. @c lambda

Value

matrix cells contain an "opportunity" weight which is 0 for SIA campaigns and calculated as using the @p cdf.fun for routine vaccination activities@see nine.month.pointmass @see constant.post.9mo

Details

The @c w.matrix function loops through all the provided activities and determines weights for all observations. These weights give the probability of an individual having the "opportunity" to be vaccinated during a year's routine activities.