rdssim: Simulates referral chains/trees for Respondent-driven...

Description Usage Arguments References Examples

Description

Simulates referral chains/trees for Respondent-driven sampling

Usage

1
2
rdssim(adjList, referral.type = c("sRW", "acRW"), wRreplacement = TRUE,
  nSamples, nReferrals, seedNode, rseed)

Arguments

adjList

is the object adj2list returns. It has the adjacency list of the input social network. It assumes that adjList represents an undirected network. Refer to adj2list.

referral.type

referral type. It can be "sRW", simple random walk, or "acRW", anti-cluster random walk.

wRreplacement

if TRUE, then the referral chain/tree will be collected with replacement.

nSamples

number of samples to be collected.

nReferrals

number of referral per participant (or node)

seedNode

the starting seed participant (or node).

rseed

random seed for random number generators inside the code. It is useful for reproducing results.

References

Khabbazian, Mohammad, Bret Hanlon, Zoe Russek, and Karl Rohe. "Novel sampling design for respondent-driven sampling." Electronic Journal of Statistics 11, no. 2 (2017): 4769-4812.'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
generate.network <- function(N,con){
   A <- matrix(0,ncol=N,nrow=N) # initialize with zeros
   A[upper.tri(A)] <- rbinom(N*(N-1)/2,1,con) # fill up the upper triangle
   A[lower.tri(A)] <- t(A)[lower.tri(A)] # fill up the lower triangle to obtain a symmetric matrix
   A
}

ER <- generate.network(300,0.6)

adjL <- adj2list(ER)
res  <- rdssim(adjL, referral.type="sRW", wRreplacement = T, 
                nSamples=100, nReferrals=3, seedNode=10, rseed=1)

khabbazian/rdssim documentation built on May 20, 2019, 9:22 a.m.