plot.rds.data.frame: Diagnostic plots for the RDS recruitment process

Description Usage Arguments Details Value Examples

View source: R/rds.data.frame-plots.R

Description

Diagnostic plots for the RDS recruitment process

Usage

1
2
3
4
## S3 method for class 'rds.data.frame'
plot(x, plot.type = c("Recruitment tree",
  "Network size by wave", "Recruits by wave", "Recruits per seed",
  "Recruits per subject"), stratify.by = NULL, ...)

Arguments

x

An rds.data.frame object.

plot.type

the type of diagnostic.

stratify.by

A factor used to color or stratify the plot elements.

...

Additional arguments for the underlying plot function if applicable.

Details

Several types of diagnostics are supported by the plot.type argument. 'Recruitment tree' displays a network plot of the RDS recruitment process. 'Network size by wave' monitors systematic changes is network size based on how far subjects are from the seed 'Recruits by wave' displays counts of subjects based on how far they rare from their seed. 'Recruit per seed' shows the total tree size for each seed. 'Recruits per subject' shows counts of how many subjects are recruited by each subject who are non-terminal.

Value

Either nothing (for the recruitment tree plot), or a ggplot2 object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(fauxmadrona)
## Not run: 
plot(fauxmadrona)

## End(Not run)
plot(fauxmadrona, plot.type='Recruits by wave')
plot(fauxmadrona, plot.type='Recruits per seed')
plot(fauxmadrona, plot.type='Recruits per subject')

plot(fauxmadrona, plot.type='Recruits by wave', stratify.by='disease')
plot(fauxmadrona, plot.type='Recruits per seed', stratify.by='disease')
plot(fauxmadrona, plot.type='Recruits per subject', stratify.by='disease')

Example output



RDS documentation built on Dec. 2, 2017, 1:08 a.m.

Related to plot.rds.data.frame in RDS...