Construct a rds-object from a data.frame.
Given a data frame with the appropriate variables, initializes a
rds-object with the components required by the
estimate.b.k function for estimation.
initializeRdsObject(rds.sample, bin=1L, seeds=1L)
A data frame with required columns. See Details.
The number of degrees fo bin together. See details.
The number of seed recruiters. See details.
The essence of the function is in recovering the sampling snowball required by
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.
seeds argument is a workaround that allows to specify directly this number.
rds.sample object is assumed to be a data frame with the following column names:
MyUniIDan identifier of the sampling unit.[not required]
NS1The reported degree.[required]
refCoupNum The number of the referring coupon.
coup1The number of the 1st supplied coupon. NA if none. [required].
coupXThe number of the Xth supplied coupon. NA if none.[not required]
interviewDtThe time of the interview. In numeric representation from some origin. Ties are not allowed.
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.
A list with the following components.
rds.sampleThe input data frame. After ordering along time of arrival.
I.tThe sampling snowball. A list including the following items:
I.tAn integer of the count of the sampling individuals at the moments of recruitment.
degree.inAn integer with the degree of an added recruiter at the moments of recruitment.
degree.outAn integer with the degree of a removed recruiter at the moment of recruitment.
original.orderingThe order of the arrivals as was inputed in
estimatesA placeholder for the future output of
Jonathan D. Rosenblatt email@example.com
 Berchenko, Yakir, Jonathan Rosenblatt, and Simon D. W. Frost. "Modeling and Analyzing Respondent Driven Sampling as a Counting Process."" arXiv:1304.3505, April 11, 2013. HTTP://arXiv.org/abs/1304.3505.
# See examples in estimate.b.k()
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.