This is the plot
method for class "sspse"
. Objects of
this class encapsulate the
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.
# S3 method for sspse
plot(
x,
xlim = NULL,
support = 1000,
HPD.level = 0.9,
N = NULL,
ylim = NULL,
mcmc = FALSE,
type = "all",
main = "Posterior for population size",
smooth = 4,
include.tree = TRUE,
cex.main = 1,
log.degree = "",
method = "bgk",
...
)
an object of class "plot.sspse"
, usually, a result of a call
to plot.sspse
.
the (optional) x limits (x1, x2) of the plot of the posterior of the population size.
the number of equally-spaced points to use for the support of the estimated posterior density function.
numeric; probability level of the highest probability density interval determined from the estimated posterior.
Optionally, an estimate of the population size to mark on the plots as a reference point.
the (optional) vertical limits (y1, y2) of the plot of the posterior of the population size. A vertical axis is the probability density scale.
logical; If TRUE, additionally create simple diagnostic plots for the MCMC sampled statistics produced from the fit.
character; This controls the types of plots produced. If
"N"
, a density plot of the posterior for population size is produced.
and the prior for population size is overlaid. If "summary"
, a
density plot of the posterior for mean visibility in the population and
a plot of the posterior for standard deviation of the visibility in the population.
If "visibility"
, a density plot of
the visibility distribution (its posterior mean) and the same plot with the
with visibilities of those in the sample overlaid.
If "degree"
, a scatter plot of the visibilities verses the reported network sizes for
those in the sample.
If "prior"
, a density plot of the prior for population size is produced.
If "all"
, then all plots for "N"
, "summary"
, "visibility"
and
"degree"
are produced.
In all cases the visibilities are estimated (by their posterior means).
an overall title for the posterior plot.
the (optional) smoothing parameter for the density estimate.
logical; If TRUE
,
augment the reported network size by the number of recruits and one for the recruiter (if any).
This reflects a more accurate value for the visibility, but is not the reported degree.
In particular, it typically produces a positive visibility (compared to a possibility zero reported degree).
an overall title for the posterior plot.
a character string which contains "x"
if the (horizontal) degree axis in the plot
of the estimated visibilites for each respondent verses their reported network sizes be logarithmic.
A value of "y"
uses a logarithmic visibility axis and "xy"
both. The default is ""
, no logarithmic axes.
character; The method to use for density estimation (default Gaussian Kernel; "bgk"). "Bayes" uses a Bayesian density estimator which has good properties.
further arguments passed to or from other methods.
By default it produces a density plot of the posterior for population size and the prior for population size is overlaid. It also produces a density plot of the posterior for mean network size in the population, the posterior for standard deviation of the network size, and a density plot of the posterior mean network size distribution with sample histogram overlaid.
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.
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.
if (FALSE) {
data(fauxmadrona)
# Here interval=1 and samplesize=50 so that it will run faster. It should be much 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(fit, mcmc=TRUE)
}
Run the code above in your browser using DataLab