Description Usage Arguments Value Examples
The pop function simulates a population of hunters and whether or not they were successful in harvesting.
1 |
N |
The desired population size. |
split |
Proportion of the population that is placed into group 1.
The remaining proportion, i.e. ( |
success1 |
Probability of a hunter in group 1 to harvest |
success2 |
Probability of a hunter in group 2 to harvest |
A data frame of class hhss_pop
where each observation
represents a hunter. It contains the variables:
N
: The population size.
true_harvest
: The sum of harvests from the population.
group
: The group in which the hunter was placed.
harvest
: 1 for a successful hunter, and 0 if unsuccessful.
1 2 3 4 5 6 7 8 | # Simulate a population of 10,000 hunters where each hunter has a
# probability of 0.3 to harvest:
pop(N = 10000, success1 = 0.3)
# Simulate a population of 10,000 hunters where roughly 70% of hunters are in
# group 1, and the remaining 30% are in group 2. Simulate harvest so hunters
# in group 1 harvest at a probability of 0.3, and hunters in group 2 at 0.5:
pop(N = 10000, split = 0.7, success1 = 0.3, success2 = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.