Description Usage Arguments Value Note References See Also Examples

Generates a sample from the sampling process assumed in the reference.
Well, actually, only the sufficient statistics required by `Estimate.b.k`

are returned.

1 | ```
makeRdsSample(N.k, b.k, sample.length)
``` |

`N.k` |
An integer vector with the population frequency of each degree. |

`b.k` |
A numeric vector of the sampling rates of each degree. |

`sample.length` |
The length of the sample. Specified as the number of recruitees before termination. |

An object of class `rds-object`

suitable for applying `Estimate.b.k`

.

The simulator does not prodice a whole RDS sample, but rather the sufficient statistics required for applying `Estimate.b.k`

.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# Generate data:
true.Nks <- rep(0,100); true.Nks[c(2,100)] <- 1000
theta <- 1e-1
true.log.bks <- rep(-Inf, 100);true.log.bks[c(2,100)] <- theta*log(c(2,100))
sample.length <- 1000L
rds.simulated.object <- makeRdsSample(
N.k =true.Nks ,
b.k = exp(true.log.bks),
sample.length = sample.length)
# Estimate:
Estimate.b.k(rds.object = rds.simulated.object )
chords:::compareNkEstimate(rds.simulated.object$estimates$Nk.estimates, true.Nks)
``` |

chords documentation built on May 30, 2017, 3:39 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.