Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RDS.II.estimates

RDS-II Estimates


Description

This function computes the RDS-II estimates for a categorical variable or the RDS-II estimate for a numeric variable.

Usage

RDS.II.estimates(
  rds.data,
  outcome.variable,
  N = NULL,
  subset = NULL,
  empir.lik = TRUE,
  to.factor = FALSE
)

Arguments

rds.data

An rds.data.frame that indicates recruitment patterns by a pair of attributes named “id” and “recruiter.id”.

outcome.variable

A string giving the name of the variable in the rds.data that contains a categorical or numeric variable to be analyzed.

N

Population size to be used to calculate the empirical likelihood interval. If NULL, this value is taken to be the population.size.mid attribute of the data and if that is not set, no finite population correction is used.

subset

An optional criterion to subset rds.data by. It is a character string giving an R expression which, when evaluated, subset the data. In plain English, it can be something like "seed > 0" to exclude seeds. It can 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.

empir.lik

If true, and outcome.variable is numeric, standard errors based on empirical likelihood will be given.

to.factor

force variable to be a factor

Value

If outcome.variable is numeric then the RDS-II estimate of the mean is returned, otherwise a vector of proportion estimates is returned. If the empir.lik is true, an object of class rds.interval.estimate is returned. This is a list with components

  • estimate: The numerical point estimate of proportion of the trait.variable.

  • interval: A matrix with six columns and one row per category of trait.variable:

    • point estimate: The HT estimate of the population mean.

    • 95% Lower Bound: Lower 95% confidence bound.

    • 95% Upper Bound: Upper 95% confidence bound.

    • Design Effect: The design effect of the RDS.

    • s.e.: Standard error.

    • n: Count of the number of sample values with that value of the trait.

Otherwise, an object of class rds.II.estimate is returned.

Author(s)

Mark S. Handcock and W. Whipple Neely

References

Gile, Krista J., Handcock, Mark S., 2010, Respondent-driven Sampling: An Assessment of Current Methodology. Sociological Methodology 40, 285-327.

Salganik, M., Heckathorn, D. D., 2004. Sampling and estimation in hidden populations using respondent-driven sampling. Sociological Methodology 34, 193-239.

Volz, E., Heckathorn, D., 2008. Probability based estimation theory for Respondent Driven Sampling. The Journal of Official Statistics 24 (1), 79-97.

See Also

Examples

data(faux)
RDS.II.estimates(rds.data=faux,outcome.variable='X')
RDS.II.estimates(rds.data=faux,outcome.variable='X',subset= Y!="blue")

RDS

Respondent-Driven Sampling

v0.9-3
LGPL-2.1
Authors
Mark S. Handcock [aut, cre], Krista J. Gile [aut], Ian E. Fellows [aut], W. Whipple Neely [aut]
Initial release
2021-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.