| compute.weights | R Documentation |
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(),
outcome.variable = NULL,
hcg.wave.fallback = FALSE,
cont.breaks = 3,
...
)
rds.data |
An |
weight.type |
A string giving the type of estimator to use. The options
are |
N |
An estimate of the number of members of the population being
sampled. If |
subset |
An optional criterion to subset |
control |
A list of control parameters for algorithm
tuning. Constructed using |
outcome.variable |
The name of the variable defining the groups. Required for the group-model weight types ("RDS-I", "RDS-I (DS)" and "HCG"). |
hcg.wave.fallback |
Logical. Internal use: allows the HCG weights to fall
back to recruitment-wave ordering when recruitment times are absent. Used by
the bootstrap machinery; direct HCG weight computations require recruitment
time unless |
cont.breaks |
The number of groups a continuous outcome is discretized into for the group-model weight types. |
... |
Additional parameters passed to the individual weighting algorithms. |
A vector of weights for each of the respondents. It is of the same
size as the number of rows in rds.data. Subjects with missing outcome
values receive weight 0 for the group-model weight types; they are retained
internally (as their own group) while the weights are fit, so that
recruitment chains passing through them are preserved.
rds.I.weights, gile.ss.weights, vh.weights
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.