Description Usage Arguments Details Value Examples
The survey functions take an output from pop
and simulate
survey responses based on the method specified.
census()
creates a simulation where
all hunters report, successful or not.
This can mimic both mandatory reporting for all hunters
as well as voluntary reporting.
Follow up surveys can be completed on the non-responding portion
of the population by simple random sampling.
mand()
creates a simulation where only
successful hunters report and a follow up sample of
non-respondents can be taken through a simple random sample.
simple()
creates a simulation where a population of hunters
are surveyed using a simple random sample. Follow up survey is
completed by following up with all non-respondents from the
initial sample.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
x |
An output from |
resp |
Probability/probabilities of response.
|
bias |
Scales the value(s) supplied to |
fol |
Logical. If |
fol_sample |
Probability that a non-respondent is sampled for a follow up survey. |
fol_scale |
Scales initial response probabilities, creating new probabilities of response for follow up surveys. |
times |
The number of times to repeat the simulation. |
sample |
Probability a hunter is sampled for a survey |
More than one value can be supplied to resp
and bias
. These
functions automatically create a full factorial design on
these two arguments.
If any scaling arguments scale probabilities to be > 1, the probabilities will silently be limited to 1.
A list of class survsim_census
, survsim_mand
,
or survsim_simple
where the length is equal to the
integer supplied to times
. The ultimate elements are data frames
that will contain some,
but not all, of these variables:
N
: The population size.
true_harvest
: The sum of harvests from the population.
resp_bias
: The response bias simulated.
init_rate
: The response probability for hunters to
initially report harvest. Only reported in mand()
outputs.
init_uns_rate
: The probability at which a hunter responded
to an initial survey if they were unsuccessful in harvesting.
init_suc_rate
: The probability at which a hunter responded
to an initial survey if they were successful in harvesting.
init_sample
: The sum of hunters sampled in initial survey.
init_resp
: The sum of responses to intial survey.
init_yes
: The sum of initial responses that were from hunters
who harvested.
init_no
: The sum of initial responses that were from hunters
who did not harvest.
fol_sample
: The sum of hunters sampled for follow up.
fol_uns_rate
: The probability at which a hunter
responded to a follow up survey if they did not harvest.
fol_suc_rate
: The probability at which a hunter
responded to a follow up survey if they harvested.
fol_resp
: The sum of hunters that responded to the follow up.
fol_yes
: The sum of follow up responses that were from hunters
who harvested.
fol_no
: The sum of follow up responses that were from hunters
who did not harvest.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # First, create a population:
my_pop <- pop(N = 1000, split = 0.7, success1 = 0.25, success2 = 0.6)
# Simulate a simple random sample from that population:
simple(
my_pop,
sample = 0.4,
resp = 0.3,
bias = 1,
times = 10
)
# Multiple values can be passed to 'resp' and 'bias' arguments to create
# simulations for each unique pairing of the two:
census(
my_pop,
resp = seq(0.3, 0.8, 0.1),
bias = c(1, 1.1, 1.2),
fol = TRUE,
fol_sample = 0.4,
fol_scale = 0.7,
times = 10
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.