plot.sspse | R Documentation |
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 class '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",
...
)
x |
an object of class |
xlim |
the (optional) x limits (x1, x2) of the plot of the posterior of the population size. |
support |
the number of equally-spaced points to use for the support of the estimated posterior density function. |
HPD.level |
numeric; probability level of the highest probability density interval determined from the estimated posterior. |
N |
Optionally, an estimate of the population size to mark on the plots as a reference point. |
ylim |
the (optional) vertical limits (y1, y2) of the plot of the posterior of the population size. A vertical axis is the probability density scale. |
mcmc |
logical; If TRUE, additionally create simple diagnostic plots for the MCMC sampled statistics produced from the fit. |
type |
character; This controls the types of plots produced. If
|
main |
an overall title for the posterior plot. |
smooth |
the (optional) smoothing parameter for the density estimate. |
include.tree |
logical; If |
cex.main |
an overall title for the posterior plot. |
log.degree |
a character string which contains |
method |
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.
The model fitting function posteriorsize
,
plot
.
Function coef
will extract the matrix of coefficients with
standard errors, t-statistics and p-values.
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.