Compute estimates of the sampling weights of the respondent's observations based on various estimators
compute.weights(
rds.data,
weight.type = c("Gile's SS", "RDS-I", "RDS-I (DS)", "RDS-II", "Arithmetic Mean", "HCG"),
N = NULL,
subset = NULL,
control = control.rds.estimates(),
...
)A vector of weights for each of the respondents. It is of the same
size as the number of rows in rds.data.
An rds.data.frame that indicates recruitment patterns
by a pair of attributes named ``id'' and ``recruiter.id''.
A string giving the type of estimator to use. The options
are "Gile's SS", "RDS-I", "RDS-II", "RDS-I/DS",
and "Arithemic Mean". It defaults to "Gile's
SS".
An estimate of the number of members of the population being
sampled. If NULL it is read as the population.size.mid attribute of
the rds.data frame. If that is missing, the weights will sum to 1. Note that
this parameter is required for Gile's SS.
An optional criterion to subset rds.data by. It is
an R expression which, when evaluated, subset the
data. In plain English, it can be something like subset = seed > 0 to
exclude seeds. It can also be the name of a logical vector of the same length of
the outcome variable where TRUE means include it in the analysis. If
NULL then no subsetting is done.
A list of control parameters for algorithm
tuning. Constructed using
control.rds.estimates.
Additional parameters passed to the individual weighting algorithms.
rds.I.weights, gile.ss.weights, vh.weights