Description Usage Arguments Value References Examples
View source: R/bootstrapintervals.R
This function computes an interval estimate for one or more categorical variables. It optionally uses attributes of the RDS data set to determine the type of estimator and type of uncertainty estimate to use.
1 2 3 4 
rds.data 
An 
outcome.variable 
A string giving the name of the variable in the

weight.type 
A string giving the type of estimator to use. The options
are 
uncertainty 
A string giving the type of uncertainty estimator to use.
The options are 
N 
An estimate of the number of members of the population being
sampled. If 
subset 
An optional criterion to subset 
confidence.level 
The confidence level for the confidence intervals. The default is 0.95 for 95%. 
number.of.bootstrap.samples 
The number of bootstrap samples to take
in estimating the uncertainty of the estimator. If 
continuous 
A numerical value between 0 and 1 or the character value 
fast 
Use a fast bootstrap where the weights are reused from the estimator rather than being recomputed for each bootstrap sample. 
useC 
Use a Clevel implementation of Gile's bootstrap (rather than the R level). The implementations should be a computational equivalent estimator (except for speed). 
ci.type 
Type of confidence interval to use, if possible. If "t", use lower and upper confidence interval values based on the standard deviation of the bootstrapped values and a t multiplier. If "pivotal", use lower and upper confidence interval values based on the basic bootstrap (also called the pivotal confidence interval). If "quantile", use lower and upper confidence interval values based on the quantiles of the bootstrap sample. If "proportion", use the "t" unless the estimated proportion is less than 0.15 or the bounds are outside [0,1 . In this case, try the "quantile" and constrain the bounds to be compatible with [0,1]. 
control 
A list of control parameters for algorithm
tuning. Constructed using 
... 
Additional arguments for RDS.*.estimates. 
An object of class rds.interval.estimate
summarizing the inference.
The confidence interval and standard error are based on the bootstrap procedure.
In additon, the object has attribute bsresult
which provides details of the
bootstrap procedure. The contents of the bsresult
attribute depends on the
uncertainty
used. If uncertainty=="Salganik"
then bsresult
is a
vector of standard deviations of the bootstrap samples.
If uncertainty=="Gile's SS"
then
bsresult
is a list with components for the bootstrap point estimate,
the bootstrap
samples themselves and the standard deviations of the bootstrap samples.
If uncertainty=="SRS"
then bsresult
is NULL.
Gile, Krista J. 2011 Improved Inference for RespondentDriven Sampling Data with Application to HIV Prevalence Estimation, Journal of the American Statistical Association, 106, 135146.
Gile, Krista J., Handcock, Mark S., 2010 Respondentdriven Sampling: An Assessment of Current Methodology. Sociological Methodology 40, 285327.
1 2 3 4 5 6 7  ## Not run:
data(fauxmadrona)
RDS.bootstrap.intervals(rds.data=fauxmadrona,weight.type="RDSII",
uncertainty="Salganik",
outcome.variable="disease",N=1000,number.of.bootstrap.samples=50)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.