run_rot: run_rot to run simulation of the effect of rotations on the...

Description Usage Arguments Value Examples

View source: R/run_rot.r

Description

can run any number of insecticides/loci

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
run_rot(
  max_gen = 200,
  n_insecticides = 4,
  start_freqs = 0.01,
  rot_interval = 0,
  mort_or_freq = "freq",
  mort_thresh = 0.9,
  freq_thresh = 0.5,
  migration = 0.01,
  coverage = 0.8,
  start_insecticide = 1,
  expo_hi = 0.8,
  expo_lo = 0,
  male_expo_prop = 0,
  eff = 0.95,
  dom_sel = 0.5,
  dom_cos = 0.5,
  rr = 0.5,
  cost = 0.1,
  fitSS = 1,
  min_rwr_interval = 0,
  change_interval = 10,
  no_r_below_start = FALSE,
  no_r_below_mut = FALSE,
  exit_rot = FALSE,
  min_gens_switch_back = 0,
  plot = TRUE,
  diagnostics = FALSE,
  logy = NULL,
  add_gens_under50 = FALSE,
  plot_mort = NULL
)

Arguments

max_gen

maximum number of mosquito generations to run the simulation

n_insecticides

number of insecticides (and hence loci)

start_freqs

starting frequencies of resistance either one per insecticide or same for all

rot_interval

frequency of rotation (in generations) if set to zero means sequence, i.e. change when threshold reached

mort_or_freq

whether threshold for insecticide change is mortality 'mort' or resistance frequency 'freq'

mort_thresh

mortality threshold for switching insecticides, default 0.9, only used if mort_or_freq is mort

freq_thresh

resistance frequency threshold for switching insecticides, default 0.5, only used if mort_or_freq is freq

migration

migration rate between treated & untreated areas 0-1. We assume that immigration=emigration.

coverage

proportion of mosquitoes that are covered by the intervention (and 1-C is the proportion of the population in the untreated refugia), if coverage set to 1 no refugia.

start_insecticide

which insecticide to start with

expo_hi

proportion of females exposed to insecticide in hi niche, either single or vector of 1 per insecticide

expo_lo

optional proportion of females exposed to insecticide in lo niche, either single or vector of 1 per insecticide

male_expo_prop

proportion that males are exposed relative to f, default 1, likely to be <1 (could possibly be a vector per insecticide)

eff

effectiveness propn. SS killed by insecticide, one value for all insecticides or individually

dom_sel

dominance of selection, for all insecticides or individually

dom_cos

dominance of cost, for all insecticides or individually

rr

resistance restoration, how much resistance restores fitness of RR in presence of insecticide, for all insecticides or individually

cost

fitness cost of RR in no insecticide, for all insecticides or individually

fitSS

fitness of SS if no insecticide, usually assumed to be 1, for all insecticides or individually

min_rwr_interval

minimum rotate-when-resistant interval to stop short switches, only used when rot_interval==0. set to 0 to have no effect.

change_interval

interval that insecticide can be changed on for both rotation and sequence, default 10 gens 1 year

no_r_below_start

to stop resistance frequencies going below starting values TRUE or FALSE, beware can cause odd results

no_r_below_mut

to stop resistance frequencies going below mutation-selection balance TRUE or FALSE

exit_rot

whether to exit rotation interval if threshold is reached

min_gens_switch_back

minimum num gens before can switch back to an insecticide

plot

whether to plot results

diagnostics

whether to output running info

logy

whether to use log scale for y axis

add_gens_under50

whether to add a label of num generations under 50 pcent resistance

plot_mort

whether to add mortality to plots

Value

dataframe of results

Examples

1
2
3
4
5
6
run_rot(rot_interval=100)
dfr <- run_rot(rot_interval=50, max_gen = 300)
dfr <- run_rot(rot_interval=0, max_gen = 300)
dfr <- run_rot(rot_interval=0, max_gen = 300, migration=0.01)
#running for insecticides with different inputs
dfr <- run_rot(n_insecticides=3, eff=c(1,0.6,0.4), rot_interval=0)

ian-hastings/rotations documentation built on Dec. 14, 2020, 11:42 p.m.