Learn R Programming

sspse (version 1.1.0-2)

plot.pospreddeg: Plots the posterior predictive p-values for the reported network sizes

Description

This function extracts from an estimate of the posterior distribution of the population size based on data collected by Respondent Driven Sampling. The approach approximates the RDS via the Sequential Sampling model of Gile (2008). As such, it is referred to as the Sequential Sampling - Population Size Estimate (SS-PSE). It uses the order of selection of the sample to provide information on the distribution of network sizes over the population members.

Usage

# S3 method for pospreddeg
plot(
  x,
  main = "Posterior Predictive p-values for the self-reported network sizes",
  nclass = 20,
  hist = FALSE,
  ylim = c(0, 2),
  order.by.recruitment.time = FALSE,
  ...
)

Arguments

x

an object of class "pospreddeg", usually, a result of a call to pospreddeg.

main

character; title for the plot

nclass

count; The number of classes for the histogram plot

hist

logical; If TRUE plot a histogram of the p-values rather than a density estimate.

ylim

two-vector; lower and upper limits of vertical/density axis.

order.by.recruitment.time

logical; If TRUE, the reorder the input data by the recruitment time

...

further arguments passed to or from other methods.

Details

It computes the posterior predictive distribution for each reported network size and computes the percentile rank of the reported network size within that posterior. The percentile rank should be about 0.5 for a well specified model, but could be close to uniform if there is little information about the reported network size. The percentile ranks should not be extreme (e.g., close to zero or one) on a consistent basis as this indicates a misspecified model.

References

Gile, Krista J. (2008) Inference from Partially-Observed Network Data, Ph.D. Thesis, Department of Statistics, University of Washington.

Gile, Krista J. and Handcock, Mark S. (2010) Respondent-Driven Sampling: An Assessment of Current Methodology, Sociological Methodology 40, 285-327.

Gile, Krista J. and Handcock, Mark S. (2014) sspse: Estimating Hidden Population Size using Respondent Driven Sampling Data R package, Los Angeles, CA. Version 0.5, https://hpmrg.org/sspse/.

Handcock MS (2003). degreenet: Models for Skewed Count Distributions Relevant to Networks. Statnet Project, Seattle, WA. Version 1.2, https://statnet.org/.

Handcock, Mark S., Gile, Krista J. and Mar, Corinne M. (2014) Estimating Hidden Population Size using Respondent-Driven Sampling Data, Electronic Journal of Statistics, 8, 1, 1491-1521

Handcock, Mark S., Gile, Krista J. and Mar, Corinne M. (2015) Estimating the Size of Populations at High Risk for HIV using Respondent-Driven Sampling Data, Biometrics.

See Also

The model fitting function posteriorsize, plot.

Examples

Run this code

if (FALSE) {
data(fauxmadrona)
# Here interval=1 so that it will run faster. It should be higher in a 
# real application.
fit <- posteriorsize(fauxmadrona, median.prior.size=1000,
                                 burnin=10, interval=1, samplesize=50)
summary(fit)
# Let's look at some MCMC diagnostics
plot(pospreddeg(fit))
}

Run the code above in your browser using DataLab