This function computes the sequential sampling (MA) estimates for a categorical variable or numeric variable.
MA.estimates(
rds.data,
trait.variable,
seed.selection = "degree",
number.of.seeds = NULL,
number.of.coupons = NULL,
number.of.iterations = 3,
N = NULL,
M1 = 25,
M2 = 20,
seed = 1,
initial.sampling.probabilities = NULL,
MPLE.samplesize = 50000,
SAN.maxit = 5,
SAN.nsteps = 2^19,
sim.interval = 10000,
number.of.cross.ties = NULL,
max.degree = NULL,
parallel = 1,
parallel.type = "PSOCK",
full.output = FALSE,
verbose = TRUE
)
If trait.variable
is numeric then the model-assisted estimate
of the mean is returned, otherwise a vector of proportion estimates is
returned. If full.output=TRUE
this leads to:
If full.output=FALSE
this leads to an object of class
rds.interval.estimate
which is a list with component
the numerical point estimate of proportion of thetrait.variable
.
a matrix with size columns and one row per category of trait.variable
:
The HT estimate of the population mean.
Lower 95% confidence bound
Upper 95% confidence bound
The design effect of the RDS
standard error
count of the number of sample values with that value of the trait
an rds.data.frame
that indicates recruitment
patterns by a pair of attributes named ``id'' and ``recruiter.id''.
an estimate of the number of members of the population being
sampled. If NULL
it is read as the pop.size.mid
attribute of
the rds.data
frame. If that is missing it defaults to 1000.
the number of networked populations generated at each iteration.
the number of (full) RDS populations generated for each networked population at each iteration.
the random number seed used to initiate the computations.
an estimate of the mechanism guiding the choice of seeds. The choices are
indicating that all the seeds had the trait;
meaning they were, as if, a simple random sample of individuals from the population;
indicating that the seeds are taken as those in the sample (and resampled for the population with that composition if necessary);
is proportional to the degree of the individual;
indicating that all the seeds had the trait and the probability of being a seed is proportional to the degree of the respondent.
The number of seeds chosen to initiate the sampling.
The number of coupons given to each respondent.
The number of iterations used at the core of the algorithm.
The name of the outcome variable
The type of weighting used (i.e. MA)
The type of weighting used (i.e. MA)
A list of other diagnostic output from the computations.
Output from the bootstrap procedure. A list with two
elements: var
is the bootstrap variance, and BSest
is the
vector of bootstrap estimates themselves.
estimate of the parameter of the ERGM for the network.
An rds.data.frame
that indicates recruitment patterns
by a pair of attributes named ``id'' and ``recruiter.id''.
A string giving the name of the variable in the
rds.data
that contains a categorical or numeric variable to be
analyzed.
An estimate of the mechanism guiding the choice of seeds. The choices are
indicating that all the seeds had the trait;
meaning they were, as if, a simple random sample of individuals from the population;
indicating that the seeds are taken as those in the sample (and resampled for the population with that composition if necessary);
is proportional to the degree of the individual;
indicating that all the seeds had the trait and the probability of being a seed is proportional to the degree of the respondent.
The number of seeds chosen to initiate the sampling.
The number of coupons given to each respondent.
The number of iterations used at the core of the algorithm.
An estimate of the number of members of the population being
sampled. If NULL
it is read as the pop.size.mid
attribute of
the rds.data
frame. If that is missing it defaults to 1000.
The number of networked populations generated at each iteration.
The number of (full) RDS samples generated for each networked population at each iteration.
The random number seed used to initiate the computations.
Initialize sampling probabilities for the algorithm. If missing, they are taken as proportional to degree, and this is almost always the best starting values.
Number of samples to take in the computation of the maximum pseudolikelihood estimator (MPLE) of the working model parameter. The default is almost always sufficient.
A ceiling on the number of simulated annealing iterations.
Number of MCMC proposals for all the annealing runs combined.
Number of MCMC steps between each of the M1 sampled networks per iteration.
The expected number of ties between those with
the trait and those without. If missing, it is computed based on the
respondent's reports of the number of ties they have to population members
who have the trait (i.e. ties.to.trait.variable
) and do not have the
trait (i.e. ties.not.to.trait.variable
).
Impose ceiling on degree size.
Number of processors to use in the computations. The default is 1, that is no parallel processing.
The type of cluster to start. e.g. 'PSOCK', 'MPI', etc.
More verbose output
Should verbose diagnostics be printed while the algorithm is running.
Krista J. Gile with help from Mark S. Handcock
Gile, Krista J. 2011 Improved Inference for Respondent-Driven Sampling Data with Application to HIV Prevalence Estimation, Journal of the American Statistical Association, 106, 135-146.
Gile, Krista J., Handcock, Mark S., 2010. Respondent-driven Sampling: An Assessment of Current Methodology, Sociological Methodology, 40, 285-327. <doi:10.1111/j.1467-9531.2010.01223.x>
Gile, Krista J., Beaudry, Isabelle S. and Handcock, Mark S., 2018 Methods for Inference from Respondent-Driven Sampling Data, Annual Review of Statistics and Its Application <doi:10.1146/annurev-statistics-031017-100704>.
RDS.I.estimates
, RDS.I.estimates
if (FALSE) {
data(faux)
MA.estimates(rds.data=faux,trait.variable='X')
}
Run the code above in your browser using DataLab