run_simulation: run_simulation

Description Usage Arguments Value Examples

Description

run_simulation takes in a species name, a month, the number of samples to draw for that month, a region and optionally the environment layer resolution. It performs the simulation for the species' population sampling in the region across different months.

Usage

1
run_simulation(species_name, month, N, region, resolution = 10)

Arguments

species_name

a vector containing genus and species name

month

an interger (1-12) indicating the month of interest

N

number of species samples to draw in the reference month

region

a vector of region names specifying a region of interest from national levels down to county levels

resolution

the spatial resolution of environmental layers (10, 5, or 2.5 (arc min))

Value

log: a raster stack of logistic probability raster of the given region by month

sample: a list of sample points (spatial points) drawn from the given region by month

range: the range of logistic probabilities in the given region across all months useful for setting a common color scale when plotting the probability rasters for all months

N: number of samples drawn from each month (proportionate to the reference month sample size by ratio of mean logistic probabilities)

Examples

1
2
3
4
5
region1 <- c("USA", "Pennsylvania")
species_name1 <- c("Ixodes", "ricinus", "Linnaeus")
species_name2 <- c("mus", "musculus")
result1 <- run_simulation(species_name1, month, N, region1, resolution)
result2 <- run_simulation(species_name2, month, N, region1, resolution)

elaineliu5/DVM documentation built on May 16, 2019, 2:57 a.m.