initializeRdsObject {chords}R Documentation

Construct a rds-object from a data.frame.

Description

Given a data frame with the appropriate variables, initializes a rds-object with the components required by the Estimate.b.k function for estimation.

Usage

  initializeRdsObject(rds.sample, bin=1L, seeds=1L)

Arguments

rds.sample

A data frame with required columns. See Details.

bin

The number of degrees fo bin together. See details.

seeds

The number of seed recruiters. See details.

Details

The essence of the function is in recovering the sampling snowball required by Estimate.b.k. The function allows for recruiters to enter and exit the sampling snowball. The number of seed recruiters is typically not specified in an RDS file. The seeds argument is a workaround that allows to specify directly this number.

The rds.sample object is assumed to be a data frame with the following column names:

  1. MyUniIDan identifier of the sampling unit.[not required]

  2. NS1The reported degree.[required]

  3. refCoupNum The number of the referring coupon.

  4. coup1The number of the 1st supplied coupon. NA if none. [required].

  5. coupXThe number of the Xth supplied coupon. NA if none.[not required]

  6. interviewDtThe time of the interview. In numeric representation from some origin. Ties are not allowed.

See brazil for a sample data.frame.

If the sample is short, stabilization of degree estimates can be achieved by binning degrees together. This can be done with the bin argument. Note however that the interpretation of the estimated degree counts is now different as the k'th degree is actually the k'th bin, which is only proportional to k. An exception is the function getTheta which also accepts a bin argument for proper estimation of theta.

Value

A list with the following components.

References

[1] Berchenko, Y., Rosenblatt J.D., and S.D.W. Frost. "Modeling and Analyzing Respondent Driven Sampling as a Counting Process." arXiv:1304.3505

See Also

Estimate.b.k, makeRdsSample, brazil


[Package chords version 0.95.4 Index]