From 5ac8f23998e14b480337841b42ae2e3b102e8497 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 25 Sep 2023 10:32:06 -0400 Subject: [PATCH] Add in boolean for using data for initial pests/pathogens in soil. --- R/calibrate.R | 4 +- R/configuration.R | 34 +++-- R/pops.r | 306 +++++++++++++++++++---------------------- R/pops_multirun.R | 4 +- R/validate.R | 4 +- man/calibrate.Rd | 307 ++++++++++++++++++++--------------------- man/pops.Rd | 316 ++++++++++++++++++++----------------------- man/pops_model.Rd | 152 ++++++++++----------- man/pops_multirun.Rd | 316 ++++++++++++++++++++----------------------- man/validate.Rd | 307 ++++++++++++++++++++--------------------- 10 files changed, 815 insertions(+), 935 deletions(-) diff --git a/R/calibrate.R b/R/calibrate.R index 77982a96..21fac1fb 100644 --- a/R/calibrate.R +++ b/R/calibrate.R @@ -199,7 +199,8 @@ calibrate <- function(infected_years_file, multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "") { + soil_starting_pest_file = "", + start_with_soil_populations = FALSE) { # add all data to config list config <- c() @@ -293,6 +294,7 @@ calibrate <- function(infected_years_file, config$file_random_seeds <- file_random_seeds config$use_soils <- use_soils config$soil_starting_pest_file <- soil_starting_pest_file + config$start_with_soil_populations <- start_with_soil_populations # call configuration function to perform data checks and transform data into # format used in pops c++ diff --git a/R/configuration.R b/R/configuration.R index 3ff69990..caca81b9 100644 --- a/R/configuration.R +++ b/R/configuration.R @@ -194,22 +194,26 @@ configuration <- function(config) { # check that soils raster has the same crs, resolutin, and extent. if (config$use_soils) { - if (config$function_name %in% aws_bucket_list) { - soils_check <- - secondary_raster_checks( - config$soil_starting_pest_file, infected, config$use_s3, config$bucket) - } else { - soils_check <- secondary_raster_checks(config$soil_starting_pest_file, infected) - } - if (soils_check$checks_passed) { - soil_pests <- soils_check$raster - config$soil_pests <- terra::as.matrix(soil_pests, wide = TRUE) - } else { - config$failure <- soils_check$failed_check - if (config$failure == file_exists_error) { - config$failure <- detailed_file_exists_error(config$soil_starting_pest_file) + if (config$start_with_soil_populations) { + if (config$function_name %in% aws_bucket_list) { + soils_check <- + secondary_raster_checks( + config$soil_starting_pest_file, infected, config$use_s3, config$bucket) + } else { + soils_check <- secondary_raster_checks(config$soil_starting_pest_file, infected) } - return(config) + if (soils_check$checks_passed) { + soil_pests <- soils_check$raster + config$soil_pests <- terra::as.matrix(soil_pests, wide = TRUE) + } else { + config$failure <- soils_check$failed_check + if (config$failure == file_exists_error) { + config$failure <- detailed_file_exists_error(config$soil_starting_pest_file) + } + return(config) + } + } else { + config$soil_pests <- zero_matrix } } else { config$soil_pests <- zero_matrix diff --git a/R/pops.r b/R/pops.r index 60141350..dc7272cb 100644 --- a/R/pops.r +++ b/R/pops.r @@ -8,194 +8,166 @@ #' a single stochastic realization of the model and is predominantly used for #' automated tests of model features. #' -#' @param infected_file Raster file with initial infections. Units for -#' infections are based on data availability and the way the units used for your -#' host file is created (e.g. percent area, # of hosts per cell, etc.). -#' @param host_file path to raster files with number of hosts and standard -#' deviation on those estimates can be based in 3 formats (a single file with -#' number of hosts, a single file with 2 layers number of hosts and standard -#' deviation, or two files 1 with number of hosts and the other with standard -#' deviation of those estimates). The units for this can be of many formats the -#' two most common that we use are either percent area (0 to 100) or # of hosts -#' in the cell. Usually depends on data available and estimation methods. -#' @param total_populations_file path to raster file with number of total -#' populations of all hosts and non-hosts. This depends on how your host data is -#' set up. If host is percent area then this should be a raster with values -#' that are 100 anywhere with host. If host file is # of hosts in a cell then -#' this should be a raster with values that are the max of the host raster any -#' where the # of hosts is greater than 0. -#' @param temp boolean that allows the use of temperature coefficients to -#' modify spread (TRUE or FALSE) -#' @param temperature_coefficient_file path to raster file with temperature -#' coefficient data for the timestep and and time period specified (e.g. if timestep -#' = week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -#' have 52 * 3 bands = 156 bands with data being weekly precipitation -#' coefficients). We convert raw precipitation values to coefficients that -#' affect the reproduction and survival of the pest all values in the raster are -#' between 0 and 1. -#' @param precip boolean that allows the use of precipitation coefficients to -#' modify spread (TRUE or FALSE) -#' @param precipitation_coefficient_file Raster file with precipitation -#' coefficient data for the timestep and time period specified (e.g. if timestep -#' = week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -#' have 52 * 3 bands = 156 bands with data being weekly precipitation -#' coefficients). We convert raw precipitation values to coefficients that -#' affect the reproduction and survival of the pest all values in the raster are -#' between 0 and 1. -#' @param time_step how often should spread occur options: ('day', 'week', 'month'). -#' @param season_month_start when does spread first start occurring in the year -#' for your pest or pathogen (integer value between 1 and 12) -#' @param season_month_end when does spread end during the year for your pest -#' or pathogen (integer value between 1 and 12) -#' @param start_date date to start the simulation with format ('YYYY_MM_DD') -#' @param end_date date to end the simulation with format ('YYYY_MM_DD') -#' @param use_lethal_temperature a boolean to answer the question: does your -#' pest or pathogen have a temperature at which it cannot survive? +#' @param infected_file Raster file with initial infections. Units for infections are based on data +#' availability and the way the units used for your host file is created (e.g. percent area, # of +#' hosts per cell, etc.). +#' @param host_file path to raster files with number of hosts and standard deviation on those +#' estimates can be based in 3 formats (a single file with number of hosts, a single file with 2 +#' layers number of hosts and standard deviation, or two files 1 with number of hosts and the other +#' with standard deviation of those estimates). The units for this can be of many formats the two +#' most common that we use are either percent area (0 to 100) or # of hosts in the cell. Usually +#' depends on data available and estimation methods. +#' @param total_populations_file path to raster file with number of total populations of all hosts +#' and non-hosts. This depends on how your host data is set up. If host is percent area then this +#' should be a raster with values that are 100 anywhere with host. If host file is # of hosts in a +#' cell then this should be a raster with values that are the max of the host raster any where the +#' # of hosts is greater than 0. +#' @param temp boolean that allows the use of temperature coefficients to modify spread #' (TRUE or FALSE) -#' @param temperature_file path to raster file with temperature data for -#' minimum temperature -#' @param lethal_temperature the temperature in degrees C at which lethal -#' temperature related mortality occurs for your pest or pathogen (-50 to 60) -#' @param lethal_temperature_month the month in which lethal temperature -#' related mortality occurs for your pest or pathogen integer value between 1 -#' and 12 -#' @param mortality_on boolean to turn host mortality on and off +#' @param temperature_coefficient_file path to raster file with temperature coefficient data for the +#' timestep and and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +#' end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +#' precipitation coefficients). We convert raw precipitation values to coefficients that affect the +#' reproduction and survival of the pest all values in the raster are between 0 and 1. +#' @param precip boolean that allows the use of precipitation coefficients to modify spread #' (TRUE or FALSE) -#' @param mortality_rate rate at which mortality occurs value between 0 and 1 -#' @param mortality_time_lag time lag from infection until mortality can occur -#' in time steps integer >= 1 -#' @param mortality_frequency sets the frequency of mortality calculations occur -#' either ('year', 'month', week', 'day', 'time step', or 'every_n_steps') -#' @param mortality_frequency_n sets number of units from mortality_frequency in -#' which to run the mortality calculation if mortality_frequency is -#' 'every_n_steps'. Must be an integer >= 1. -#' @param management boolean to allow use of management (TRUE or FALSE) -#' @param treatment_dates dates in which to apply treatment list with format -#' ('YYYY_MM_DD') (needs to be the same length as treatment_file and -#' pesticide_duration) -#' @param treatments_file path to raster files with treatment data by dates. -#' Needs to be a list of files the same length as treatment_dates and -#' pesticide_duration. -#' @param treatment_method what method to use when applying treatment one of -#' ("ratio" or "all infected"). ratio removes a portion of all infected and -#' susceptibles, all infected removes all infected a portion of susceptibles. -#' @param natural_kernel_type what type of dispersal kernel should be used for -#' natural dispersal. Current dispersal kernel options are -#' ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', -#' 'hyperbolic secant', 'gamma', 'weibull', -#' 'logistic') -#' @param anthropogenic_kernel_type what type of dispersal kernel should be -#' used for anthropogenic dispersal. Current dispersal kernel options are -#' ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', -#' 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network') -#' @param natural_dir sets the predominate direction of natural dispersal -#' usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -#' 'NONE') -#' @param anthropogenic_dir sets the predominate direction of anthropogenic -#' dispersal usually due to human movement typically over long distances (e.g. -#' nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -#' 'SE', 'E', 'NE', 'NONE') -#' @param pesticide_duration how long does the pestcide (herbicide, vaccine, -#' etc..) last before the host is susceptible again. If value is 0 treatment -#' is a culling (i.e. host removal) not a pesticide treatment. (needs to be the -#' same length as treatment_dates and treatment_file) -#' @param pesticide_efficacy how effictive is the pesticide at preventing the -#' disease or killing the pest (if this is 0.70 then when applied it -#' successfully treats 70 percent of the plants or animals) -#' @param random_seed sets the random seed for the simulation used for reproducibility -#' @param output_frequency sets when outputs occur either ('year', 'month', -#' 'week', 'day', 'time step', or 'every_n_steps') -#' @param output_frequency_n sets number of units from output_frequency in which -#' to export model results if mortality_frequency is 'every_n_steps'. -#' Must be an integer >= 1. -#' @param movements_file this is a csv file with columns lon_from, lat_from, -#' lon_to, lat_to, number of animals, and date. -#' @param use_movements this is a boolean to turn on use of the movement module. -#' @param latency_period How many times steps does it take to for exposed -#' populations become infected/infested. This is an integer value and must be -#' greater than 0 if model type is SEI. -#' @param model_type What type of model most represents your system. Options -#' are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" -#' (Susceptible - Infected/Infested). Default value is "SI". -#' @param parameter_means A vector of the means of the model parameters -#' (reproductive_rate, natural_dispersal_distance, percent_natural_dispersal, -#' anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, -#' network_min_distance, and network_max_distance). 1x8 vector. -#' @param parameter_cov_matrix A covariance matrix from the previous years -#' posterior parameter estimation ordered from (reproductive_rate, -#' natural_dispersal_distance, percent_natural_dispersal, -#' anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, +#' @param precipitation_coefficient_file Raster file with precipitation coefficient data for the +#' timestep and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +#' end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +#' precipitation coefficients). We convert raw precipitation values to coefficients that affect the +#' reproduction and survival of the pest all values in the raster are between 0 and 1. +#' @param time_step How often should spread occur options: ('day', 'week', 'month'). +#' @param season_month_start When does spread first start occurring in the year for your pest or +#' pathogen (integer value between 1 and 12) +#' @param season_month_end When does spread end during the year for your pest +#' or pathogen (integer value between 1 and 12) +#' @param start_date Date to start the simulation with format ('YYYY_MM_DD') +#' @param end_date Date to end the simulation with format ('YYYY_MM_DD') +#' @param use_lethal_temperature A boolean to answer the question: does your pest or pathogen have +#' a temperature at which it cannot survive? (TRUE or FALSE) +#' @param temperature_file Path to raster file with temperature data for minimum temperature +#' @param lethal_temperature The temperature in degrees C at which lethal temperature related +#' mortality occurs for your pest or pathogen (-50 to 60) +#' @param lethal_temperature_month The month in which lethal temperature related mortality occurs +#' for your pest or pathogen integer value between 1 and 12 +#' @param mortality_on Boolean to turn host mortality on and off (TRUE or FALSE) +#' @param mortality_rate Rate at which mortality occurs value between 0 and 1 +#' @param mortality_time_lag Time lag from infection until mortality can occur in time steps +#' integer >= 1 +#' @param mortality_frequency Sets the frequency of mortality calculations occur either ('year', +#' 'month', week', 'day', 'time step', or 'every_n_steps') +#' @param mortality_frequency_n Sets number of units from mortality_frequency in which to run the +#' mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1. +#' @param management Boolean to allow use of management (TRUE or FALSE) +#' @param treatment_dates Dates in which to apply treatment list with format ('YYYY_MM_DD') +#' (needs to be the same length as treatment_file and pesticide_duration) +#' @param treatments_file Path to raster files with treatment data by dates. Needs to be a list of +#' files the same length as treatment_dates and pesticide_duration. +#' @param treatment_method What method to use when applying treatment one of ("ratio" or "all +#' infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +#' infected a portion of susceptibles. +#' @param natural_kernel_type What type of dispersal kernel should be used for natural dispersal. +#' Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +#' 'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic') +#' @param anthropogenic_kernel_type What type of dispersal kernel should be used for anthropogenic +#' dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +#' 'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +#' 'network') +#' @param natural_dir Sets the predominate direction of natural dispersal usually due to wind values +#' ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE') +#' @param anthropogenic_dir Sets the predominate direction of anthropogenic dispersal usually due +#' to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +#' ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE') +#' @param pesticide_duration How long does the pesticide (herbicide, vaccine, etc..) last before the +#' host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +#' pesticide treatment. (needs to be the same length as treatment_dates and treatment_file) +#' @param pesticide_efficacy How effective is the pesticide at preventing the disease or killing the +#' pest (if this is 0.70 then when applied it successfully treats 70 percent of the plants or +#' animals). +#' @param random_seed Sets the random seed for the simulation used for reproducibility +#' @param output_frequency Sets when outputs occur either ('year', 'month', week', 'day', +#' 'time step', or 'every_n_steps') +#' @param output_frequency_n Sets number of units from output_frequency in which to export model +#' results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1. +#' @param movements_file This is a csv file with columns lon_from, lat_from, lon_to, lat_to, number +#' of animals, and date. +#' @param use_movements This is a boolean to turn on use of the movement module. +#' @param latency_period How many times steps does it take to for exposed populations become +#' infected/infested. This is an integer value and must be greater than 0 if model type is SEI. +#' @param model_type What type of model most represents your system. Options are "SEI" +#' (Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default +#' value is "SI". +#' @param parameter_means A vector of the means of the model parameters (reproductive_rate, +#' natural_dispersal_distance, percent_natural_dispersal, anthropogenic_dispersal_distance, natural +#' kappa, anthropogenic kappa, network_min_distance, and network_max_distance). 1x8 vector. +#' @param parameter_cov_matrix A covariance matrix from the previous years posterior parameter +#' estimation ordered from (reproductive_rate, natural_dispersal_distance, +#' percent_natural_dispersal, anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, #' network_min_distance, and network_max_distance) Should be 8x8 matrix. -#' @param start_exposed Do your initial conditions start as exposed or infected -#' (only used if model_type is "SEI"). Default False. If this is TRUE need to -#' have both an infected_file (this can be a raster of all 0's) and exposed_file -#' @param generate_stochasticity Boolean to indicate whether to use -#' stochasticity in reproductive functions default is TRUE -#' @param establishment_stochasticity Boolean to indicate whether to use -#' stochasticity in establishment functions default is TRUE -#' @param movement_stochasticity Boolean to indicate whether to use -#' stochasticity in movement functions default is TRUE +#' @param start_exposed Do your initial conditions start as exposed or infected (only used if +#' model_type is "SEI"). Default False. If this is TRUE need to have both an infected_file (this +#' can be a raster of all 0's) and exposed_file +#' @param generate_stochasticity Boolean to indicate whether to use stochasticity in reproductive +#' functions default is TRUE +#' @param establishment_stochasticity Boolean to indicate whether to use stochasticity in +#' establishment functions default is TRUE +#' @param movement_stochasticity Boolean to indicate whether to use stochasticity in movement +#' functions default is TRUE #' @param dispersal_stochasticity Boolean to indicate whether to use a stochasticity in the #' dispersal kernel default is TRUE #' @param establishment_probability Threshold to determine establishment if #' establishment_stochasticity is FALSE (range 0 to 1, default = 0.5) -#' @param dispersal_percentage Percentage of dispersal used to calculate the -#' bounding box for deterministic dispersal -#' @param quarantine_areas_file path to raster file with quarantine boundaries -#' used in calculating likelihood of quarantine escape if use_quarantine is -#' TRUE -#' @param use_quarantine boolean to indicate whether or not there is a -#' quarantine area if TRUE must pass in a raster file indicating the -#' quarantine areas (default = FALSE) -#' @param quarantine_directions string with comma separated directions to include -#' in the quarantine direction analysis, e.g., 'N,E'. By default all directions -#' (N, S, E, W) are considered -#' @param use_spreadrates boolean to indicate whether or not to calculate -#' spread rates -#' @param use_overpopulation_movements boolean to indicate whether to use -#' the overpopulation pest movement module (driven by the natural kernel with -#' its scale parameter modified by a coefficient) -#' @param overpopulation_percentage percentage of occupied hosts when the cell -#' is considered to be overpopulated -#' @param leaving_percentage percentage of pests leaving an overpopulated cell -#' @param leaving_scale_coefficient coefficient to multiply scale parameter of -#' the natural kernel (if applicable) -#' @param exposed_file a file with the exposed for the current -#' @param mask Raster file used to provide a mask to remove 0's that are not -#' true negatives from comparisons (e.g. mask out lakes and oceans from statics -#' if modeling terrestrial species). This can also be used to mask out areas -#' that can't be managed in the auto_manage function. -#' @param network_filename entire file path for the network file. Used if +#' @param dispersal_percentage Percentage of dispersal used to calculate the bounding box for +#' deterministic dispersal +#' @param quarantine_areas_file Path to raster file with quarantine boundaries used in calculating +#' likelihood of quarantine escape if use_quarantine is TRUE +#' @param use_quarantine Boolean to indicate whether or not there is a quarantine area if TRUE must +#' pass in a raster file indicating the quarantine areas (default = FALSE) +#' @param quarantine_directions String with comma separated directions to include in the quarantine +#' direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered +#' @param use_spreadrates Boolean to indicate whether or not to calculate spread rates +#' @param use_overpopulation_movements Boolean to indicate whether to use the overpopulation pest +#' movement module (driven by the natural kernel with its scale parameter modified by a coefficient) +#' @param overpopulation_percentage Percentage of occupied hosts when the cell is considered to be +#' overpopulated +#' @param leaving_percentage Percentage of pests leaving an overpopulated cell +#' @param leaving_scale_coefficient Coefficient to multiply scale parameter of the natural kernel +#' (if applicable) +#' @param exposed_file A file with the exposed for the current +#' @param mask Raster file used to provide a mask to remove 0's that are not true negatives from +#' comparisons (e.g. mask out lakes and oceans from statics if modeling terrestrial species). This +#' can also be used to mask out areas that can't be managed in the auto_manage function. +#' @param network_filename The entire file path for the network file. Used if #' anthropogenic_kernel_type = 'network'. -#' @param use_survival_rates boolean to indicate if the model will use survival rates to limit the +#' @param use_survival_rates Boolean to indicate if the model will use survival rates to limit the #' survival or emergence of overwintering generations. #' @param survival_rate_month What month do over wintering generations emerge. We suggest using the #' month before for this parameter as it is when the survival rates raster will be applied. -#' @param survival_rate_day what day should the survival rates be applied +#' @param survival_rate_day What day should the survival rates be applied #' @param survival_rates_file Raster file with survival rates from 0 to 1 representing the #' percentage of emergence for a cell. #' @param network_movement What movement type do you want to use in the network kernel either #' "walk", "jump", or "teleport". "walk" allows dispersing units to leave the network at any cell #' along the edge. "jump" automatically moves to the nearest node when moving through the network. #' "teleport" moves from node to node most likely used for airport and seaport networks. -#' @param use_initial_condition_uncertainty boolean to indicate whether or not to propagate and +#' @param use_initial_condition_uncertainty Boolean to indicate whether or not to propagate and #' partition uncertainty from initial conditions. If TRUE the infected_file needs to have 2 layers #' one with the mean value and one with the standard deviation. If an SEI model is used the #' exposed_file needs to have 2 layers one with the mean value and one with the standard #' deviation -#' @param use_host_uncertainty boolean to indicate whether or not to propagate and partition +#' @param use_host_uncertainty Boolean to indicate whether or not to propagate and partition #' uncertainty from host data. If TRUE the host_file needs to have 2 layers one with the mean value #' and one with the standard deviation. -#' @param weather_type string indicating how the weather data is passed in either -#' as a mean and standard deviation to represent uncertainty ("probabilistic") or as a time -#' series ("deterministic") -#' @param dispersers_to_soils_percentage range from 0 to 1 representing the percentage -#' of dispersers that fall to the soil and survive. -#' @param soil_starting_pest_file path to the raster file with the starting -#' amount of pest or pathogen. -#' @param use_soils boolean to indicate if pests establish in the soil and spread out from there. +#' @param weather_type string indicating how the weather data is passed in either as a mean and +#' standard deviation to represent uncertainty ("probabilistic") or as a time series +#' ("deterministic") +#' @param dispersers_to_soils_percentage Range from 0 to 1 representing the percentage of dispersers +#' that fall to the soil and survive. +#' @param soil_starting_pest_file path to the raster file with the starting amount of pest or +#' pathogen. +#' @param use_soils Boolean to indicate if pests establish in the soil and spread out from there. #' Typically used for soil borne pathogens. -#' @param multiple_random_seeds boolean to indicate if the model should use multiple random seeds +#' @param multiple_random_seeds Boolean to indicate if the model should use multiple random seeds #' (allows for performing uncertainty partitioning) or a single random seed (backwards #' compatibility option). Default is FALSE. #' @param file_random_seeds A file path to the file with the .csv file containing random_seeds @@ -211,6 +183,8 @@ #' would have 52 bands with data being weekly precipitation coefficient standard deviations). We #' convert raw precipitation values to coefficients that affect the reproduction and survival of #' the pest all values in the raster are between 0 and 1. +#' @param start_with_soil_populations Boolean to indicate whether to use a starting soil pest or +#' pathogen population if TRUE then soil_starting_pest_file is required. #' #' @useDynLib PoPS, .registration = TRUE #' @importFrom terra app rast xres yres classify extract ext as.points ncol nrow project @@ -295,7 +269,8 @@ pops <- function(infected_file, multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "") { + soil_starting_pest_file = "", + start_with_soil_populations = FALSE) { config <- c() config$random_seed <- random_seed @@ -382,6 +357,7 @@ pops <- function(infected_file, config$file_random_seeds <- file_random_seeds config$use_soils <- use_soils config$soil_starting_pest_file <- soil_starting_pest_file + config$start_with_soil_populations <- start_with_soil_populations config <- configuration(config) diff --git a/R/pops_multirun.R b/R/pops_multirun.R index 387c33fe..78423d4c 100644 --- a/R/pops_multirun.R +++ b/R/pops_multirun.R @@ -108,7 +108,8 @@ pops_multirun <- function(infected_file, multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "") { + soil_starting_pest_file = "", + start_with_soil_populations = FALSE) { config <- c() config$random_seed <- random_seed config$infected_file <- infected_file @@ -192,6 +193,7 @@ pops_multirun <- function(infected_file, config$file_random_seeds <- file_random_seeds config$use_soils <- use_soils config$soil_starting_pest_file <- soil_starting_pest_file + config$start_with_soil_populations <- start_with_soil_populations config <- configuration(config) diff --git a/R/validate.R b/R/validate.R index 07923a21..f734f004 100644 --- a/R/validate.R +++ b/R/validate.R @@ -124,7 +124,8 @@ validate <- function(infected_years_file, multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "") { + soil_starting_pest_file = "", + start_with_soil_populations = FALSE) { config <- c() config$infected_years_file <- infected_years_file config$infected_file <- infected_file @@ -211,6 +212,7 @@ validate <- function(infected_years_file, config$file_random_seeds <- file_random_seeds config$use_soils <- use_soils config$soil_starting_pest_file <- soil_starting_pest_file + config$start_with_soil_populations <- start_with_soil_populations config <- configuration(config) diff --git a/man/calibrate.Rd b/man/calibrate.Rd index ead75da5..16d1df22 100644 --- a/man/calibrate.Rd +++ b/man/calibrate.Rd @@ -90,7 +90,8 @@ calibrate( multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "" + soil_starting_pest_file = "", + start_with_soil_populations = FALSE ) } \arguments{ @@ -152,155 +153,136 @@ until 1,000 model runs are less than the threshold value. We recommend running at least 1,000 but the greater this number the more accurate the model parameters selected will be.} -\item{infected_file}{Raster file with initial infections. Units for -infections are based on data availability and the way the units used for your -host file is created (e.g. percent area, # of hosts per cell, etc.).} - -\item{host_file}{path to raster files with number of hosts and standard -deviation on those estimates can be based in 3 formats (a single file with -number of hosts, a single file with 2 layers number of hosts and standard -deviation, or two files 1 with number of hosts and the other with standard -deviation of those estimates). The units for this can be of many formats the -two most common that we use are either percent area (0 to 100) or # of hosts -in the cell. Usually depends on data available and estimation methods.} - -\item{total_populations_file}{path to raster file with number of total -populations of all hosts and non-hosts. This depends on how your host data is -set up. If host is percent area then this should be a raster with values -that are 100 anywhere with host. If host file is # of hosts in a cell then -this should be a raster with values that are the max of the host raster any -where the # of hosts is greater than 0.} - -\item{temp}{boolean that allows the use of temperature coefficients to -modify spread (TRUE or FALSE)} - -\item{temperature_coefficient_file}{path to raster file with temperature -coefficient data for the timestep and and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} - -\item{precip}{boolean that allows the use of precipitation coefficients to -modify spread (TRUE or FALSE)} - -\item{precipitation_coefficient_file}{Raster file with precipitation -coefficient data for the timestep and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} - -\item{model_type}{What type of model most represents your system. Options -are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" -(Susceptible - Infected/Infested). Default value is "SI".} - -\item{latency_period}{How many times steps does it take to for exposed -populations become infected/infested. This is an integer value and must be -greater than 0 if model type is SEI.} - -\item{time_step}{how often should spread occur options: ('day', 'week', 'month').} - -\item{season_month_start}{when does spread first start occurring in the year -for your pest or pathogen (integer value between 1 and 12)} - -\item{season_month_end}{when does spread end during the year for your pest +\item{infected_file}{Raster file with initial infections. Units for infections are based on data +availability and the way the units used for your host file is created (e.g. percent area, # of +hosts per cell, etc.).} + +\item{host_file}{path to raster files with number of hosts and standard deviation on those +estimates can be based in 3 formats (a single file with number of hosts, a single file with 2 +layers number of hosts and standard deviation, or two files 1 with number of hosts and the other +with standard deviation of those estimates). The units for this can be of many formats the two +most common that we use are either percent area (0 to 100) or # of hosts in the cell. Usually +depends on data available and estimation methods.} + +\item{total_populations_file}{path to raster file with number of total populations of all hosts +and non-hosts. This depends on how your host data is set up. If host is percent area then this +should be a raster with values that are 100 anywhere with host. If host file is # of hosts in a +cell then this should be a raster with values that are the max of the host raster any where the +# of hosts is greater than 0.} + +\item{temp}{boolean that allows the use of temperature coefficients to modify spread +(TRUE or FALSE)} + +\item{temperature_coefficient_file}{path to raster file with temperature coefficient data for the +timestep and and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} + +\item{precip}{boolean that allows the use of precipitation coefficients to modify spread +(TRUE or FALSE)} + +\item{precipitation_coefficient_file}{Raster file with precipitation coefficient data for the +timestep and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} + +\item{model_type}{What type of model most represents your system. Options are "SEI" +(Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default +value is "SI".} + +\item{latency_period}{How many times steps does it take to for exposed populations become +infected/infested. This is an integer value and must be greater than 0 if model type is SEI.} + +\item{time_step}{How often should spread occur options: ('day', 'week', 'month').} + +\item{season_month_start}{When does spread first start occurring in the year for your pest or +pathogen (integer value between 1 and 12)} + +\item{season_month_end}{When does spread end during the year for your pest or pathogen (integer value between 1 and 12)} -\item{start_date}{date to start the simulation with format ('YYYY_MM_DD')} +\item{start_date}{Date to start the simulation with format ('YYYY_MM_DD')} -\item{end_date}{date to end the simulation with format ('YYYY_MM_DD')} +\item{end_date}{Date to end the simulation with format ('YYYY_MM_DD')} -\item{use_survival_rates}{boolean to indicate if the model will use survival rates to limit the +\item{use_survival_rates}{Boolean to indicate if the model will use survival rates to limit the survival or emergence of overwintering generations.} \item{survival_rate_month}{What month do over wintering generations emerge. We suggest using the month before for this parameter as it is when the survival rates raster will be applied.} -\item{survival_rate_day}{what day should the survival rates be applied} +\item{survival_rate_day}{What day should the survival rates be applied} \item{survival_rates_file}{Raster file with survival rates from 0 to 1 representing the percentage of emergence for a cell.} -\item{use_lethal_temperature}{a boolean to answer the question: does your -pest or pathogen have a temperature at which it cannot survive? -(TRUE or FALSE)} +\item{use_lethal_temperature}{A boolean to answer the question: does your pest or pathogen have +a temperature at which it cannot survive? (TRUE or FALSE)} -\item{temperature_file}{path to raster file with temperature data for -minimum temperature} +\item{temperature_file}{Path to raster file with temperature data for minimum temperature} -\item{lethal_temperature}{the temperature in degrees C at which lethal -temperature related mortality occurs for your pest or pathogen (-50 to 60)} +\item{lethal_temperature}{The temperature in degrees C at which lethal temperature related +mortality occurs for your pest or pathogen (-50 to 60)} -\item{lethal_temperature_month}{the month in which lethal temperature -related mortality occurs for your pest or pathogen integer value between 1 -and 12} +\item{lethal_temperature_month}{The month in which lethal temperature related mortality occurs +for your pest or pathogen integer value between 1 and 12} -\item{mortality_on}{boolean to turn host mortality on and off -(TRUE or FALSE)} +\item{mortality_on}{Boolean to turn host mortality on and off (TRUE or FALSE)} -\item{mortality_rate}{rate at which mortality occurs value between 0 and 1} +\item{mortality_rate}{Rate at which mortality occurs value between 0 and 1} -\item{mortality_time_lag}{time lag from infection until mortality can occur -in time steps integer >= 1} +\item{mortality_time_lag}{Time lag from infection until mortality can occur in time steps +integer >= 1} -\item{mortality_frequency}{sets the frequency of mortality calculations occur -either ('year', 'month', week', 'day', 'time step', or 'every_n_steps')} +\item{mortality_frequency}{Sets the frequency of mortality calculations occur either ('year', +'month', week', 'day', 'time step', or 'every_n_steps')} -\item{mortality_frequency_n}{sets number of units from mortality_frequency in -which to run the mortality calculation if mortality_frequency is -'every_n_steps'. Must be an integer >= 1.} +\item{mortality_frequency_n}{Sets number of units from mortality_frequency in which to run the +mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{management}{boolean to allow use of management (TRUE or FALSE)} +\item{management}{Boolean to allow use of management (TRUE or FALSE)} -\item{treatment_dates}{dates in which to apply treatment list with format -('YYYY_MM_DD') (needs to be the same length as treatment_file and -pesticide_duration)} +\item{treatment_dates}{Dates in which to apply treatment list with format ('YYYY_MM_DD') +(needs to be the same length as treatment_file and pesticide_duration)} -\item{treatments_file}{path to raster files with treatment data by dates. -Needs to be a list of files the same length as treatment_dates and -pesticide_duration.} +\item{treatments_file}{Path to raster files with treatment data by dates. Needs to be a list of +files the same length as treatment_dates and pesticide_duration.} -\item{treatment_method}{what method to use when applying treatment one of -("ratio" or "all infected"). ratio removes a portion of all infected and -susceptibles, all infected removes all infected a portion of susceptibles.} +\item{treatment_method}{What method to use when applying treatment one of ("ratio" or "all +infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +infected a portion of susceptibles.} -\item{natural_kernel_type}{what type of dispersal kernel should be used for -natural dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', - 'logistic')} +\item{natural_kernel_type}{What type of dispersal kernel should be used for natural dispersal. +Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic')} -\item{anthropogenic_kernel_type}{what type of dispersal kernel should be -used for anthropogenic dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network')} +\item{anthropogenic_kernel_type}{What type of dispersal kernel should be used for anthropogenic +dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +'network')} -\item{natural_dir}{sets the predominate direction of natural dispersal -usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -'NONE')} +\item{natural_dir}{Sets the predominate direction of natural dispersal usually due to wind values +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} \item{natural_kappa}{sets the strength of the natural direction in the von-mises distribution numeric value between 0.01 and 12} -\item{anthropogenic_dir}{sets the predominate direction of anthropogenic -dispersal usually due to human movement typically over long distances (e.g. -nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -'SE', 'E', 'NE', 'NONE')} +\item{anthropogenic_dir}{Sets the predominate direction of anthropogenic dispersal usually due +to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} \item{anthropogenic_kappa}{sets the strength of the anthropogenic direction in the von-mises distribution numeric value between 0.01 and 12} -\item{pesticide_duration}{how long does the pestcide (herbicide, vaccine, -etc..) last before the host is susceptible again. If value is 0 treatment -is a culling (i.e. host removal) not a pesticide treatment. (needs to be the - same length as treatment_dates and treatment_file)} +\item{pesticide_duration}{How long does the pesticide (herbicide, vaccine, etc..) last before the +host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +pesticide treatment. (needs to be the same length as treatment_dates and treatment_file)} -\item{pesticide_efficacy}{how effictive is the pesticide at preventing the -disease or killing the pest (if this is 0.70 then when applied it -successfully treats 70 percent of the plants or animals)} +\item{pesticide_efficacy}{How effective is the pesticide at preventing the disease or killing the +pest (if this is 0.70 then when applied it successfully treats 70 percent of the plants or +animals).} \item{mask}{Raster file used to provide a mask to remove 0's that are not true negatives from comparisons (e.g. mask out lakes and oceans from statics @@ -308,30 +290,29 @@ if modeling terrestrial species). A numerical value represents the area you want to calculate statistics on and an NA value represents the area to remove from the statistics.} -\item{output_frequency}{sets when outputs occur either ('year', 'month', -'week', 'day', 'time step', or 'every_n_steps')} +\item{output_frequency}{Sets when outputs occur either ('year', 'month', week', 'day', +'time step', or 'every_n_steps')} -\item{output_frequency_n}{sets number of units from output_frequency in which -to export model results if mortality_frequency is 'every_n_steps'. -Must be an integer >= 1.} +\item{output_frequency_n}{Sets number of units from output_frequency in which to export model +results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{movements_file}{this is a csv file with columns lon_from, lat_from, -lon_to, lat_to, number of animals, and date.} +\item{movements_file}{This is a csv file with columns lon_from, lat_from, lon_to, lat_to, number +of animals, and date.} -\item{use_movements}{this is a boolean to turn on use of the movement module.} +\item{use_movements}{This is a boolean to turn on use of the movement module.} -\item{start_exposed}{Do your initial conditions start as exposed or infected -(only used if model_type is "SEI"). Default False. If this is TRUE need to -have both an infected_file (this can be a raster of all 0's) and exposed_file} +\item{start_exposed}{Do your initial conditions start as exposed or infected (only used if +model_type is "SEI"). Default False. If this is TRUE need to have both an infected_file (this +can be a raster of all 0's) and exposed_file} -\item{generate_stochasticity}{Boolean to indicate whether to use -stochasticity in reproductive functions default is TRUE} +\item{generate_stochasticity}{Boolean to indicate whether to use stochasticity in reproductive +functions default is TRUE} -\item{establishment_stochasticity}{Boolean to indicate whether to use -stochasticity in establishment functions default is TRUE} +\item{establishment_stochasticity}{Boolean to indicate whether to use stochasticity in +establishment functions default is TRUE} -\item{movement_stochasticity}{Boolean to indicate whether to use -stochasticity in movement functions default is TRUE} +\item{movement_stochasticity}{Boolean to indicate whether to use stochasticity in movement +functions default is TRUE} \item{dispersal_stochasticity}{Boolean to indicate whether to use a stochasticity in the dispersal kernel default is TRUE} @@ -339,31 +320,27 @@ dispersal kernel default is TRUE} \item{establishment_probability}{Threshold to determine establishment if establishment_stochasticity is FALSE (range 0 to 1, default = 0.5)} -\item{dispersal_percentage}{Percentage of dispersal used to calculate the -bounding box for deterministic dispersal} +\item{dispersal_percentage}{Percentage of dispersal used to calculate the bounding box for +deterministic dispersal} -\item{quarantine_areas_file}{path to raster file with quarantine boundaries -used in calculating likelihood of quarantine escape if use_quarantine is -TRUE} +\item{quarantine_areas_file}{Path to raster file with quarantine boundaries used in calculating +likelihood of quarantine escape if use_quarantine is TRUE} -\item{use_quarantine}{boolean to indicate whether or not there is a -quarantine area if TRUE must pass in a raster file indicating the -quarantine areas (default = FALSE)} +\item{use_quarantine}{Boolean to indicate whether or not there is a quarantine area if TRUE must +pass in a raster file indicating the quarantine areas (default = FALSE)} -\item{use_spreadrates}{boolean to indicate whether or not to calculate -spread rates} +\item{use_spreadrates}{Boolean to indicate whether or not to calculate spread rates} -\item{use_overpopulation_movements}{boolean to indicate whether to use -the overpopulation pest movement module (driven by the natural kernel with -its scale parameter modified by a coefficient)} +\item{use_overpopulation_movements}{Boolean to indicate whether to use the overpopulation pest +movement module (driven by the natural kernel with its scale parameter modified by a coefficient)} -\item{overpopulation_percentage}{percentage of occupied hosts when the cell -is considered to be overpopulated} +\item{overpopulation_percentage}{Percentage of occupied hosts when the cell is considered to be +overpopulated} -\item{leaving_percentage}{percentage of pests leaving an overpopulated cell} +\item{leaving_percentage}{Percentage of pests leaving an overpopulated cell} -\item{leaving_scale_coefficient}{coefficient to multiply scale parameter of -the natural kernel (if applicable)} +\item{leaving_scale_coefficient}{Coefficient to multiply scale parameter of the natural kernel +(if applicable)} \item{calibration_method}{choose which method of calibration to use either 'ABC' (Approximate Bayesian Computation) or 'MCMC' (Markov Chain Monte Carlo @@ -373,7 +350,7 @@ Approximation)} the calibration to converge (recommend a minimum of at least 100,000 but preferably 1 million).} -\item{exposed_file}{a file with the exposed for the current} +\item{exposed_file}{A file with the exposed for the current} \item{verbose}{Boolean with true printing current status of calibration, (e.g. the current generation, current particle, and the acceptance rate). @@ -385,7 +362,7 @@ Defaults if FALSE.} \item{output_folder_path}{this is the full path with either / or \\ (e.g., "C:/user_name/desktop/pops_sod_2020_2023/outputs/")} -\item{network_filename}{entire file path for the network file. Used if +\item{network_filename}{The entire file path for the network file. Used if anthropogenic_kernel_type = 'network'.} \item{network_movement}{What movement type do you want to use in the network kernel either @@ -405,19 +382,19 @@ comparing simulations vs. observations. Must be one of "quantity", "allocation", "mcc and distance", "rmse and distance", "mcc and configuration", "mcc and RMSE", "mcc, quantity, and configuration"). Default is "mcc"} -\item{use_initial_condition_uncertainty}{boolean to indicate whether or not to propagate and +\item{use_initial_condition_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from initial conditions. If TRUE the infected_file needs to have 2 layers one with the mean value and one with the standard deviation. If an SEI model is used the exposed_file needs to have 2 layers one with the mean value and one with the standard deviation} -\item{use_host_uncertainty}{boolean to indicate whether or not to propagate and partition +\item{use_host_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from host data. If TRUE the host_file needs to have 2 layers one with the mean value and one with the standard deviation.} -\item{weather_type}{string indicating how the weather data is passed in either -as a mean and standard deviation to represent uncertainty ("probabilistic") or as a time -series ("deterministic")} +\item{weather_type}{string indicating how the weather data is passed in either as a mean and +standard deviation to represent uncertainty ("probabilistic") or as a time series +("deterministic")} \item{temperature_coefficient_sd_file}{Raster file with temperature coefficient standard deviation data for the timestep and time period specified (e.g. if timestep = week this file @@ -431,14 +408,13 @@ would have 52 bands with data being weekly precipitation coefficient standard de convert raw precipitation values to coefficients that affect the reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{dispersers_to_soils_percentage}{range from 0 to 1 representing the percentage -of dispersers that fall to the soil and survive.} +\item{dispersers_to_soils_percentage}{Range from 0 to 1 representing the percentage of dispersers +that fall to the soil and survive.} -\item{quarantine_directions}{string with comma separated directions to include -in the quarantine direction analysis, e.g., 'N,E'. By default all directions -(N, S, E, W) are considered} +\item{quarantine_directions}{String with comma separated directions to include in the quarantine +direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered} -\item{multiple_random_seeds}{boolean to indicate if the model should use multiple random seeds +\item{multiple_random_seeds}{Boolean to indicate if the model should use multiple random seeds (allows for performing uncertainty partitioning) or a single random seed (backwards compatibility option). Default is FALSE.} @@ -446,11 +422,14 @@ compatibility option). Default is FALSE.} table. Use if you are trying to recreate an exact analysis otherwise we suggest leaving the default. Default is Null which draws the seed numbers for each.} -\item{use_soils}{boolean to indicate if pests establish in the soil and spread out from there. +\item{use_soils}{Boolean to indicate if pests establish in the soil and spread out from there. Typically used for soil borne pathogens.} -\item{soil_starting_pest_file}{path to the raster file with the starting -amount of pest or pathogen.} +\item{soil_starting_pest_file}{path to the raster file with the starting amount of pest or +pathogen.} + +\item{start_with_soil_populations}{Boolean to indicate whether to use a starting soil pest or +pathogen population if TRUE then soil_starting_pest_file is required.} } \value{ a dataframe of the variables saved and their success metrics for diff --git a/man/pops.Rd b/man/pops.Rd index a52a4c4f..c6a825e6 100644 --- a/man/pops.Rd +++ b/man/pops.Rd @@ -77,191 +77,170 @@ pops( multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "" + soil_starting_pest_file = "", + start_with_soil_populations = FALSE ) } \arguments{ -\item{infected_file}{Raster file with initial infections. Units for -infections are based on data availability and the way the units used for your -host file is created (e.g. percent area, # of hosts per cell, etc.).} - -\item{host_file}{path to raster files with number of hosts and standard -deviation on those estimates can be based in 3 formats (a single file with -number of hosts, a single file with 2 layers number of hosts and standard -deviation, or two files 1 with number of hosts and the other with standard -deviation of those estimates). The units for this can be of many formats the -two most common that we use are either percent area (0 to 100) or # of hosts -in the cell. Usually depends on data available and estimation methods.} - -\item{total_populations_file}{path to raster file with number of total -populations of all hosts and non-hosts. This depends on how your host data is -set up. If host is percent area then this should be a raster with values -that are 100 anywhere with host. If host file is # of hosts in a cell then -this should be a raster with values that are the max of the host raster any -where the # of hosts is greater than 0.} - -\item{parameter_means}{A vector of the means of the model parameters -(reproductive_rate, natural_dispersal_distance, percent_natural_dispersal, -anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, -network_min_distance, and network_max_distance). 1x8 vector.} - -\item{parameter_cov_matrix}{A covariance matrix from the previous years -posterior parameter estimation ordered from (reproductive_rate, -natural_dispersal_distance, percent_natural_dispersal, -anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, +\item{infected_file}{Raster file with initial infections. Units for infections are based on data +availability and the way the units used for your host file is created (e.g. percent area, # of +hosts per cell, etc.).} + +\item{host_file}{path to raster files with number of hosts and standard deviation on those +estimates can be based in 3 formats (a single file with number of hosts, a single file with 2 +layers number of hosts and standard deviation, or two files 1 with number of hosts and the other +with standard deviation of those estimates). The units for this can be of many formats the two +most common that we use are either percent area (0 to 100) or # of hosts in the cell. Usually +depends on data available and estimation methods.} + +\item{total_populations_file}{path to raster file with number of total populations of all hosts +and non-hosts. This depends on how your host data is set up. If host is percent area then this +should be a raster with values that are 100 anywhere with host. If host file is # of hosts in a +cell then this should be a raster with values that are the max of the host raster any where the +# of hosts is greater than 0.} + +\item{parameter_means}{A vector of the means of the model parameters (reproductive_rate, +natural_dispersal_distance, percent_natural_dispersal, anthropogenic_dispersal_distance, natural +kappa, anthropogenic kappa, network_min_distance, and network_max_distance). 1x8 vector.} + +\item{parameter_cov_matrix}{A covariance matrix from the previous years posterior parameter +estimation ordered from (reproductive_rate, natural_dispersal_distance, +percent_natural_dispersal, anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, network_min_distance, and network_max_distance) Should be 8x8 matrix.} -\item{temp}{boolean that allows the use of temperature coefficients to -modify spread (TRUE or FALSE)} +\item{temp}{boolean that allows the use of temperature coefficients to modify spread +(TRUE or FALSE)} -\item{temperature_coefficient_file}{path to raster file with temperature -coefficient data for the timestep and and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} +\item{temperature_coefficient_file}{path to raster file with temperature coefficient data for the +timestep and and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{precip}{boolean that allows the use of precipitation coefficients to -modify spread (TRUE or FALSE)} +\item{precip}{boolean that allows the use of precipitation coefficients to modify spread +(TRUE or FALSE)} -\item{precipitation_coefficient_file}{Raster file with precipitation -coefficient data for the timestep and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} +\item{precipitation_coefficient_file}{Raster file with precipitation coefficient data for the +timestep and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{model_type}{What type of model most represents your system. Options -are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" -(Susceptible - Infected/Infested). Default value is "SI".} +\item{model_type}{What type of model most represents your system. Options are "SEI" +(Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default +value is "SI".} -\item{latency_period}{How many times steps does it take to for exposed -populations become infected/infested. This is an integer value and must be -greater than 0 if model type is SEI.} +\item{latency_period}{How many times steps does it take to for exposed populations become +infected/infested. This is an integer value and must be greater than 0 if model type is SEI.} -\item{time_step}{how often should spread occur options: ('day', 'week', 'month').} +\item{time_step}{How often should spread occur options: ('day', 'week', 'month').} -\item{season_month_start}{when does spread first start occurring in the year -for your pest or pathogen (integer value between 1 and 12)} +\item{season_month_start}{When does spread first start occurring in the year for your pest or +pathogen (integer value between 1 and 12)} -\item{season_month_end}{when does spread end during the year for your pest +\item{season_month_end}{When does spread end during the year for your pest or pathogen (integer value between 1 and 12)} -\item{start_date}{date to start the simulation with format ('YYYY_MM_DD')} +\item{start_date}{Date to start the simulation with format ('YYYY_MM_DD')} -\item{end_date}{date to end the simulation with format ('YYYY_MM_DD')} +\item{end_date}{Date to end the simulation with format ('YYYY_MM_DD')} -\item{use_survival_rates}{boolean to indicate if the model will use survival rates to limit the +\item{use_survival_rates}{Boolean to indicate if the model will use survival rates to limit the survival or emergence of overwintering generations.} \item{survival_rate_month}{What month do over wintering generations emerge. We suggest using the month before for this parameter as it is when the survival rates raster will be applied.} -\item{survival_rate_day}{what day should the survival rates be applied} +\item{survival_rate_day}{What day should the survival rates be applied} \item{survival_rates_file}{Raster file with survival rates from 0 to 1 representing the percentage of emergence for a cell.} -\item{use_lethal_temperature}{a boolean to answer the question: does your -pest or pathogen have a temperature at which it cannot survive? -(TRUE or FALSE)} +\item{use_lethal_temperature}{A boolean to answer the question: does your pest or pathogen have +a temperature at which it cannot survive? (TRUE or FALSE)} -\item{temperature_file}{path to raster file with temperature data for -minimum temperature} +\item{temperature_file}{Path to raster file with temperature data for minimum temperature} -\item{lethal_temperature}{the temperature in degrees C at which lethal -temperature related mortality occurs for your pest or pathogen (-50 to 60)} +\item{lethal_temperature}{The temperature in degrees C at which lethal temperature related +mortality occurs for your pest or pathogen (-50 to 60)} -\item{lethal_temperature_month}{the month in which lethal temperature -related mortality occurs for your pest or pathogen integer value between 1 -and 12} +\item{lethal_temperature_month}{The month in which lethal temperature related mortality occurs +for your pest or pathogen integer value between 1 and 12} -\item{mortality_on}{boolean to turn host mortality on and off -(TRUE or FALSE)} +\item{mortality_on}{Boolean to turn host mortality on and off (TRUE or FALSE)} -\item{mortality_rate}{rate at which mortality occurs value between 0 and 1} +\item{mortality_rate}{Rate at which mortality occurs value between 0 and 1} -\item{mortality_time_lag}{time lag from infection until mortality can occur -in time steps integer >= 1} +\item{mortality_time_lag}{Time lag from infection until mortality can occur in time steps +integer >= 1} -\item{mortality_frequency}{sets the frequency of mortality calculations occur -either ('year', 'month', week', 'day', 'time step', or 'every_n_steps')} +\item{mortality_frequency}{Sets the frequency of mortality calculations occur either ('year', +'month', week', 'day', 'time step', or 'every_n_steps')} -\item{mortality_frequency_n}{sets number of units from mortality_frequency in -which to run the mortality calculation if mortality_frequency is -'every_n_steps'. Must be an integer >= 1.} +\item{mortality_frequency_n}{Sets number of units from mortality_frequency in which to run the +mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{management}{boolean to allow use of management (TRUE or FALSE)} +\item{management}{Boolean to allow use of management (TRUE or FALSE)} -\item{treatment_dates}{dates in which to apply treatment list with format -('YYYY_MM_DD') (needs to be the same length as treatment_file and -pesticide_duration)} +\item{treatment_dates}{Dates in which to apply treatment list with format ('YYYY_MM_DD') +(needs to be the same length as treatment_file and pesticide_duration)} -\item{treatments_file}{path to raster files with treatment data by dates. -Needs to be a list of files the same length as treatment_dates and -pesticide_duration.} +\item{treatments_file}{Path to raster files with treatment data by dates. Needs to be a list of +files the same length as treatment_dates and pesticide_duration.} -\item{treatment_method}{what method to use when applying treatment one of -("ratio" or "all infected"). ratio removes a portion of all infected and -susceptibles, all infected removes all infected a portion of susceptibles.} +\item{treatment_method}{What method to use when applying treatment one of ("ratio" or "all +infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +infected a portion of susceptibles.} -\item{natural_kernel_type}{what type of dispersal kernel should be used for -natural dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', - 'logistic')} +\item{natural_kernel_type}{What type of dispersal kernel should be used for natural dispersal. +Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic')} -\item{anthropogenic_kernel_type}{what type of dispersal kernel should be -used for anthropogenic dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network')} +\item{anthropogenic_kernel_type}{What type of dispersal kernel should be used for anthropogenic +dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +'network')} -\item{natural_dir}{sets the predominate direction of natural dispersal -usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -'NONE')} +\item{natural_dir}{Sets the predominate direction of natural dispersal usually due to wind values +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} -\item{anthropogenic_dir}{sets the predominate direction of anthropogenic -dispersal usually due to human movement typically over long distances (e.g. -nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -'SE', 'E', 'NE', 'NONE')} +\item{anthropogenic_dir}{Sets the predominate direction of anthropogenic dispersal usually due +to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} -\item{pesticide_duration}{how long does the pestcide (herbicide, vaccine, -etc..) last before the host is susceptible again. If value is 0 treatment -is a culling (i.e. host removal) not a pesticide treatment. (needs to be the - same length as treatment_dates and treatment_file)} +\item{pesticide_duration}{How long does the pesticide (herbicide, vaccine, etc..) last before the +host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +pesticide treatment. (needs to be the same length as treatment_dates and treatment_file)} -\item{pesticide_efficacy}{how effictive is the pesticide at preventing the -disease or killing the pest (if this is 0.70 then when applied it -successfully treats 70 percent of the plants or animals)} +\item{pesticide_efficacy}{How effective is the pesticide at preventing the disease or killing the +pest (if this is 0.70 then when applied it successfully treats 70 percent of the plants or +animals).} -\item{random_seed}{sets the random seed for the simulation used for reproducibility} +\item{random_seed}{Sets the random seed for the simulation used for reproducibility} -\item{output_frequency}{sets when outputs occur either ('year', 'month', -'week', 'day', 'time step', or 'every_n_steps')} +\item{output_frequency}{Sets when outputs occur either ('year', 'month', week', 'day', +'time step', or 'every_n_steps')} -\item{output_frequency_n}{sets number of units from output_frequency in which -to export model results if mortality_frequency is 'every_n_steps'. -Must be an integer >= 1.} +\item{output_frequency_n}{Sets number of units from output_frequency in which to export model +results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{movements_file}{this is a csv file with columns lon_from, lat_from, -lon_to, lat_to, number of animals, and date.} +\item{movements_file}{This is a csv file with columns lon_from, lat_from, lon_to, lat_to, number +of animals, and date.} -\item{use_movements}{this is a boolean to turn on use of the movement module.} +\item{use_movements}{This is a boolean to turn on use of the movement module.} -\item{start_exposed}{Do your initial conditions start as exposed or infected -(only used if model_type is "SEI"). Default False. If this is TRUE need to -have both an infected_file (this can be a raster of all 0's) and exposed_file} +\item{start_exposed}{Do your initial conditions start as exposed or infected (only used if +model_type is "SEI"). Default False. If this is TRUE need to have both an infected_file (this +can be a raster of all 0's) and exposed_file} -\item{generate_stochasticity}{Boolean to indicate whether to use -stochasticity in reproductive functions default is TRUE} +\item{generate_stochasticity}{Boolean to indicate whether to use stochasticity in reproductive +functions default is TRUE} -\item{establishment_stochasticity}{Boolean to indicate whether to use -stochasticity in establishment functions default is TRUE} +\item{establishment_stochasticity}{Boolean to indicate whether to use stochasticity in +establishment functions default is TRUE} -\item{movement_stochasticity}{Boolean to indicate whether to use -stochasticity in movement functions default is TRUE} +\item{movement_stochasticity}{Boolean to indicate whether to use stochasticity in movement +functions default is TRUE} \item{dispersal_stochasticity}{Boolean to indicate whether to use a stochasticity in the dispersal kernel default is TRUE} @@ -269,40 +248,35 @@ dispersal kernel default is TRUE} \item{establishment_probability}{Threshold to determine establishment if establishment_stochasticity is FALSE (range 0 to 1, default = 0.5)} -\item{dispersal_percentage}{Percentage of dispersal used to calculate the -bounding box for deterministic dispersal} +\item{dispersal_percentage}{Percentage of dispersal used to calculate the bounding box for +deterministic dispersal} -\item{quarantine_areas_file}{path to raster file with quarantine boundaries -used in calculating likelihood of quarantine escape if use_quarantine is -TRUE} +\item{quarantine_areas_file}{Path to raster file with quarantine boundaries used in calculating +likelihood of quarantine escape if use_quarantine is TRUE} -\item{use_quarantine}{boolean to indicate whether or not there is a -quarantine area if TRUE must pass in a raster file indicating the -quarantine areas (default = FALSE)} +\item{use_quarantine}{Boolean to indicate whether or not there is a quarantine area if TRUE must +pass in a raster file indicating the quarantine areas (default = FALSE)} -\item{use_spreadrates}{boolean to indicate whether or not to calculate -spread rates} +\item{use_spreadrates}{Boolean to indicate whether or not to calculate spread rates} -\item{use_overpopulation_movements}{boolean to indicate whether to use -the overpopulation pest movement module (driven by the natural kernel with -its scale parameter modified by a coefficient)} +\item{use_overpopulation_movements}{Boolean to indicate whether to use the overpopulation pest +movement module (driven by the natural kernel with its scale parameter modified by a coefficient)} -\item{overpopulation_percentage}{percentage of occupied hosts when the cell -is considered to be overpopulated} +\item{overpopulation_percentage}{Percentage of occupied hosts when the cell is considered to be +overpopulated} -\item{leaving_percentage}{percentage of pests leaving an overpopulated cell} +\item{leaving_percentage}{Percentage of pests leaving an overpopulated cell} -\item{leaving_scale_coefficient}{coefficient to multiply scale parameter of -the natural kernel (if applicable)} +\item{leaving_scale_coefficient}{Coefficient to multiply scale parameter of the natural kernel +(if applicable)} -\item{exposed_file}{a file with the exposed for the current} +\item{exposed_file}{A file with the exposed for the current} -\item{mask}{Raster file used to provide a mask to remove 0's that are not -true negatives from comparisons (e.g. mask out lakes and oceans from statics -if modeling terrestrial species). This can also be used to mask out areas -that can't be managed in the auto_manage function.} +\item{mask}{Raster file used to provide a mask to remove 0's that are not true negatives from +comparisons (e.g. mask out lakes and oceans from statics if modeling terrestrial species). This +can also be used to mask out areas that can't be managed in the auto_manage function.} -\item{network_filename}{entire file path for the network file. Used if +\item{network_filename}{The entire file path for the network file. Used if anthropogenic_kernel_type = 'network'.} \item{network_movement}{What movement type do you want to use in the network kernel either @@ -310,19 +284,19 @@ anthropogenic_kernel_type = 'network'.} along the edge. "jump" automatically moves to the nearest node when moving through the network. "teleport" moves from node to node most likely used for airport and seaport networks.} -\item{use_initial_condition_uncertainty}{boolean to indicate whether or not to propagate and +\item{use_initial_condition_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from initial conditions. If TRUE the infected_file needs to have 2 layers one with the mean value and one with the standard deviation. If an SEI model is used the exposed_file needs to have 2 layers one with the mean value and one with the standard deviation} -\item{use_host_uncertainty}{boolean to indicate whether or not to propagate and partition +\item{use_host_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from host data. If TRUE the host_file needs to have 2 layers one with the mean value and one with the standard deviation.} -\item{weather_type}{string indicating how the weather data is passed in either -as a mean and standard deviation to represent uncertainty ("probabilistic") or as a time -series ("deterministic")} +\item{weather_type}{string indicating how the weather data is passed in either as a mean and +standard deviation to represent uncertainty ("probabilistic") or as a time series +("deterministic")} \item{temperature_coefficient_sd_file}{Raster file with temperature coefficient standard deviation data for the timestep and time period specified (e.g. if timestep = week this file @@ -336,14 +310,13 @@ would have 52 bands with data being weekly precipitation coefficient standard de convert raw precipitation values to coefficients that affect the reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{dispersers_to_soils_percentage}{range from 0 to 1 representing the percentage -of dispersers that fall to the soil and survive.} +\item{dispersers_to_soils_percentage}{Range from 0 to 1 representing the percentage of dispersers +that fall to the soil and survive.} -\item{quarantine_directions}{string with comma separated directions to include -in the quarantine direction analysis, e.g., 'N,E'. By default all directions -(N, S, E, W) are considered} +\item{quarantine_directions}{String with comma separated directions to include in the quarantine +direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered} -\item{multiple_random_seeds}{boolean to indicate if the model should use multiple random seeds +\item{multiple_random_seeds}{Boolean to indicate if the model should use multiple random seeds (allows for performing uncertainty partitioning) or a single random seed (backwards compatibility option). Default is FALSE.} @@ -351,11 +324,14 @@ compatibility option). Default is FALSE.} table. Use if you are trying to recreate an exact analysis otherwise we suggest leaving the default. Default is Null which draws the seed numbers for each.} -\item{use_soils}{boolean to indicate if pests establish in the soil and spread out from there. +\item{use_soils}{Boolean to indicate if pests establish in the soil and spread out from there. Typically used for soil borne pathogens.} -\item{soil_starting_pest_file}{path to the raster file with the starting -amount of pest or pathogen.} +\item{soil_starting_pest_file}{path to the raster file with the starting amount of pest or +pathogen.} + +\item{start_with_soil_populations}{Boolean to indicate whether to use a starting soil pest or +pathogen population if TRUE then soil_starting_pest_file is required.} } \value{ list of infected and susceptible per year diff --git a/man/pops_model.Rd b/man/pops_model.Rd index a552bf13..3ceb7d45 100644 --- a/man/pops_model.Rd +++ b/man/pops_model.Rd @@ -91,30 +91,28 @@ pops_model( ) } \arguments{ -\item{random_seed}{sets the random seed for the simulation used for reproducibility} +\item{random_seed}{Sets the random seed for the simulation used for reproducibility} -\item{multiple_random_seeds}{boolean to indicate if the model should use multiple random seeds +\item{multiple_random_seeds}{Boolean to indicate if the model should use multiple random seeds (allows for performing uncertainty partitioning) or a single random seed (backwards compatibility option). Default is FALSE.} -\item{use_lethal_temperature}{a boolean to answer the question: does your -pest or pathogen have a temperature at which it cannot survive? -(TRUE or FALSE)} +\item{use_lethal_temperature}{A boolean to answer the question: does your pest or pathogen have +a temperature at which it cannot survive? (TRUE or FALSE)} -\item{lethal_temperature}{the temperature in degrees C at which lethal -temperature related mortality occurs for your pest or pathogen (-50 to 60)} +\item{lethal_temperature}{The temperature in degrees C at which lethal temperature related +mortality occurs for your pest or pathogen (-50 to 60)} -\item{lethal_temperature_month}{the month in which lethal temperature -related mortality occurs for your pest or pathogen integer value between 1 -and 12} +\item{lethal_temperature_month}{The month in which lethal temperature related mortality occurs +for your pest or pathogen integer value between 1 and 12} -\item{use_survival_rates}{boolean to indicate if the model will use survival rates to limit the +\item{use_survival_rates}{Boolean to indicate if the model will use survival rates to limit the survival or emergence of overwintering generations.} \item{survival_rate_month}{What month do over wintering generations emerge. We suggest using the month before for this parameter as it is when the survival rates raster will be applied.} -\item{survival_rate_day}{what day should the survival rates be applied} +\item{survival_rate_day}{What day should the survival rates be applied} \item{infected}{matrix of infected hosts} @@ -130,8 +128,7 @@ model type} \item{total_hosts}{matrix of all hosts} -\item{mortality_on}{boolean to turn host mortality on and off -(TRUE or FALSE)} +\item{mortality_on}{Boolean to turn host mortality on and off (TRUE or FALSE)} \item{mortality_tracker}{matrix of 0's to track mortality per year} @@ -140,21 +137,18 @@ model type} \item{quarantine_areas}{areas that are set as quarantined for computing escape from quarantine statistics.} -\item{quarantine_directions}{string with comma separated directions to include -in the quarantine direction analysis, e.g., 'N,E'. By default all directions -(N, S, E, W) are considered} +\item{quarantine_directions}{String with comma separated directions to include in the quarantine +direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered} \item{treatment_maps}{list of matrices where treatment or management has occurred in a given year} -\item{treatment_dates}{dates in which to apply treatment list with format -('YYYY_MM_DD') (needs to be the same length as treatment_file and -pesticide_duration)} +\item{treatment_dates}{Dates in which to apply treatment list with format ('YYYY_MM_DD') +(needs to be the same length as treatment_file and pesticide_duration)} -\item{pesticide_duration}{how long does the pestcide (herbicide, vaccine, -etc..) last before the host is susceptible again. If value is 0 treatment -is a culling (i.e. host removal) not a pesticide treatment. (needs to be the - same length as treatment_dates and treatment_file)} +\item{pesticide_duration}{How long does the pesticide (herbicide, vaccine, etc..) last before the +host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +pesticide treatment. (needs to be the same length as treatment_dates and treatment_file)} \item{resistant}{matrix to track resistant population over time} @@ -182,7 +176,7 @@ overwinter population that emerges} \item{rows_cols}{vector of number of rows and columns in the raster files} -\item{time_step}{how often should spread occur options: ('day', 'week', 'month').} +\item{time_step}{How often should spread occur options: ('day', 'week', 'month').} \item{reproductive_rate}{number of spores or pest units produced by a single host under optimal weather conditions} @@ -191,29 +185,27 @@ host under optimal weather conditions} \item{season_month_start_end}{vector of months when spread starts and stops} -\item{mortality_rate}{rate at which mortality occurs value between 0 and 1} +\item{mortality_rate}{Rate at which mortality occurs value between 0 and 1} -\item{mortality_time_lag}{time lag from infection until mortality can occur -in time steps integer >= 1} +\item{mortality_time_lag}{Time lag from infection until mortality can occur in time steps +integer >= 1} -\item{start_date}{date to start the simulation with format ('YYYY_MM_DD')} +\item{start_date}{Date to start the simulation with format ('YYYY_MM_DD')} -\item{end_date}{date to end the simulation with format ('YYYY_MM_DD')} +\item{end_date}{Date to end the simulation with format ('YYYY_MM_DD')} -\item{treatment_method}{what method to use when applying treatment one of -("ratio" or "all infected"). ratio removes a portion of all infected and -susceptibles, all infected removes all infected a portion of susceptibles.} +\item{treatment_method}{What method to use when applying treatment one of ("ratio" or "all +infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +infected a portion of susceptibles.} -\item{natural_kernel_type}{what type of dispersal kernel should be used for -natural dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', - 'logistic')} +\item{natural_kernel_type}{What type of dispersal kernel should be used for natural dispersal. +Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic')} -\item{anthropogenic_kernel_type}{what type of dispersal kernel should be -used for anthropogenic dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network')} +\item{anthropogenic_kernel_type}{What type of dispersal kernel should be used for anthropogenic +dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +'network')} \item{use_anthropogenic_kernel}{A boolean that turns on the use of the anthropogenic or long distance dispersal portion of the 2 scale dispersal @@ -228,27 +220,24 @@ dispersal kernel numeric value > 0} \item{anthropogenic_distance_scale}{distance scale parameter for anthropogenic range dispersal kernel numeric value > 0} -\item{natural_dir}{sets the predominate direction of natural dispersal -usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -'NONE')} +\item{natural_dir}{Sets the predominate direction of natural dispersal usually due to wind values +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} \item{natural_kappa}{sets the strength of the natural direction in the von-mises distribution numeric value between 0.01 and 12} -\item{anthropogenic_dir}{sets the predominate direction of anthropogenic -dispersal usually due to human movement typically over long distances (e.g. -nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -'SE', 'E', 'NE', 'NONE')} +\item{anthropogenic_dir}{Sets the predominate direction of anthropogenic dispersal usually due +to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} \item{anthropogenic_kappa}{sets the strength of the anthropogenic direction in the von-mises distribution numeric value between 0.01 and 12} -\item{output_frequency}{sets when outputs occur either ('year', 'month', -'week', 'day', 'time step', or 'every_n_steps')} +\item{output_frequency}{Sets when outputs occur either ('year', 'month', week', 'day', +'time step', or 'every_n_steps')} -\item{output_frequency_n}{sets number of units from output_frequency in which -to export model results if mortality_frequency is 'every_n_steps'. -Must be an integer >= 1.} +\item{output_frequency_n}{Sets number of units from output_frequency in which to export model +results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} \item{quarantine_frequency}{sets how often the quarantine statistics are calculated either ('year', 'month', 'week', 'day' or 'time step') @@ -257,9 +246,8 @@ calculated either ('year', 'month', 'week', 'day' or 'time step') \item{quarantine_frequency_n}{sets number units ('year', 'month', 'week', 'day' or 'time step') in which to calculate and export quarantine statistics.} -\item{use_quarantine}{boolean to indicate whether or not there is a -quarantine area if TRUE must pass in a raster file indicating the -quarantine areas (default = FALSE)} +\item{use_quarantine}{Boolean to indicate whether or not there is a quarantine area if TRUE must +pass in a raster file indicating the quarantine areas (default = FALSE)} \item{spreadrate_frequency}{sets how often the spread rate statistics are calculated either ('year', 'month', 'week', 'day' or 'time step') @@ -269,32 +257,29 @@ calculated either ('year', 'month', 'week', 'day' or 'time step') 'day' or 'time step') in which to calculate and export spread rate statistics.} -\item{mortality_frequency}{sets the frequency of mortality calculations occur -either ('year', 'month', week', 'day', 'time step', or 'every_n_steps')} +\item{mortality_frequency}{Sets the frequency of mortality calculations occur either ('year', +'month', week', 'day', 'time step', or 'every_n_steps')} -\item{mortality_frequency_n}{sets number of units from mortality_frequency in -which to run the mortality calculation if mortality_frequency is -'every_n_steps'. Must be an integer >= 1.} +\item{mortality_frequency_n}{Sets number of units from mortality_frequency in which to run the +mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{use_spreadrates}{boolean to indicate whether or not to calculate -spread rates} +\item{use_spreadrates}{Boolean to indicate whether or not to calculate spread rates} \item{model_type_}{What type of model most represents your system. Options are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default value is "SI".} -\item{latency_period}{How many times steps does it take to for exposed -populations become infected/infested. This is an integer value and must be -greater than 0 if model type is SEI.} +\item{latency_period}{How many times steps does it take to for exposed populations become +infected/infested. This is an integer value and must be greater than 0 if model type is SEI.} -\item{generate_stochasticity}{Boolean to indicate whether to use -stochasticity in reproductive functions default is TRUE} +\item{generate_stochasticity}{Boolean to indicate whether to use stochasticity in reproductive +functions default is TRUE} -\item{establishment_stochasticity}{Boolean to indicate whether to use -stochasticity in establishment functions default is TRUE} +\item{establishment_stochasticity}{Boolean to indicate whether to use stochasticity in +establishment functions default is TRUE} -\item{movement_stochasticity}{Boolean to indicate whether to use -stochasticity in movement functions default is TRUE} +\item{movement_stochasticity}{Boolean to indicate whether to use stochasticity in movement +functions default is TRUE} \item{dispersal_stochasticity}{Boolean to indicate whether to use a stochasticity in the dispersal kernel default is TRUE} @@ -302,20 +287,19 @@ dispersal kernel default is TRUE} \item{establishment_probability}{Threshold to determine establishment if establishment_stochasticity is FALSE (range 0 to 1, default = 0.5)} -\item{dispersal_percentage}{Percentage of dispersal used to calculate the -bounding box for deterministic dispersal} +\item{dispersal_percentage}{Percentage of dispersal used to calculate the bounding box for +deterministic dispersal} -\item{use_overpopulation_movements}{boolean to indicate whether to use -the overpopulation pest movement module (driven by the natural kernel with -its scale parameter modified by a coefficient)} +\item{use_overpopulation_movements}{Boolean to indicate whether to use the overpopulation pest +movement module (driven by the natural kernel with its scale parameter modified by a coefficient)} -\item{overpopulation_percentage}{percentage of occupied hosts when the cell -is considered to be overpopulated} +\item{overpopulation_percentage}{Percentage of occupied hosts when the cell is considered to be +overpopulated} -\item{leaving_percentage}{percentage of pests leaving an overpopulated cell} +\item{leaving_percentage}{Percentage of pests leaving an overpopulated cell} -\item{leaving_scale_coefficient}{coefficient to multiply scale parameter of -the natural kernel (if applicable)} +\item{leaving_scale_coefficient}{Coefficient to multiply scale parameter of the natural kernel +(if applicable)} \item{bbox}{bounding box for network kernel} @@ -325,7 +309,7 @@ anthropogenic_kernel_type = 'network'.} \item{network_max_distance}{maximum time a propagule rides on the network. Used if anthropogenic_kernel_type = 'network'.} -\item{network_filename}{entire file path for the network file. Used if +\item{network_filename}{The entire file path for the network file. Used if anthropogenic_kernel_type = 'network'.} \item{network_movement}{What movement type do you want to use in the network kernel either diff --git a/man/pops_multirun.Rd b/man/pops_multirun.Rd index 0eb6ca3a..9c999d55 100644 --- a/man/pops_multirun.Rd +++ b/man/pops_multirun.Rd @@ -81,155 +81,136 @@ pops_multirun( multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "" + soil_starting_pest_file = "", + start_with_soil_populations = FALSE ) } \arguments{ -\item{infected_file}{Raster file with initial infections. Units for -infections are based on data availability and the way the units used for your -host file is created (e.g. percent area, # of hosts per cell, etc.).} - -\item{host_file}{path to raster files with number of hosts and standard -deviation on those estimates can be based in 3 formats (a single file with -number of hosts, a single file with 2 layers number of hosts and standard -deviation, or two files 1 with number of hosts and the other with standard -deviation of those estimates). The units for this can be of many formats the -two most common that we use are either percent area (0 to 100) or # of hosts -in the cell. Usually depends on data available and estimation methods.} - -\item{total_populations_file}{path to raster file with number of total -populations of all hosts and non-hosts. This depends on how your host data is -set up. If host is percent area then this should be a raster with values -that are 100 anywhere with host. If host file is # of hosts in a cell then -this should be a raster with values that are the max of the host raster any -where the # of hosts is greater than 0.} - -\item{parameter_means}{A vector of the means of the model parameters -(reproductive_rate, natural_dispersal_distance, percent_natural_dispersal, -anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, -network_min_distance, and network_max_distance). 1x8 vector.} - -\item{parameter_cov_matrix}{A covariance matrix from the previous years -posterior parameter estimation ordered from (reproductive_rate, -natural_dispersal_distance, percent_natural_dispersal, -anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, +\item{infected_file}{Raster file with initial infections. Units for infections are based on data +availability and the way the units used for your host file is created (e.g. percent area, # of +hosts per cell, etc.).} + +\item{host_file}{path to raster files with number of hosts and standard deviation on those +estimates can be based in 3 formats (a single file with number of hosts, a single file with 2 +layers number of hosts and standard deviation, or two files 1 with number of hosts and the other +with standard deviation of those estimates). The units for this can be of many formats the two +most common that we use are either percent area (0 to 100) or # of hosts in the cell. Usually +depends on data available and estimation methods.} + +\item{total_populations_file}{path to raster file with number of total populations of all hosts +and non-hosts. This depends on how your host data is set up. If host is percent area then this +should be a raster with values that are 100 anywhere with host. If host file is # of hosts in a +cell then this should be a raster with values that are the max of the host raster any where the +# of hosts is greater than 0.} + +\item{parameter_means}{A vector of the means of the model parameters (reproductive_rate, +natural_dispersal_distance, percent_natural_dispersal, anthropogenic_dispersal_distance, natural +kappa, anthropogenic kappa, network_min_distance, and network_max_distance). 1x8 vector.} + +\item{parameter_cov_matrix}{A covariance matrix from the previous years posterior parameter +estimation ordered from (reproductive_rate, natural_dispersal_distance, +percent_natural_dispersal, anthropogenic_dispersal_distance, natural kappa, anthropogenic kappa, network_min_distance, and network_max_distance) Should be 8x8 matrix.} -\item{temp}{boolean that allows the use of temperature coefficients to -modify spread (TRUE or FALSE)} +\item{temp}{boolean that allows the use of temperature coefficients to modify spread +(TRUE or FALSE)} -\item{temperature_coefficient_file}{path to raster file with temperature -coefficient data for the timestep and and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} +\item{temperature_coefficient_file}{path to raster file with temperature coefficient data for the +timestep and and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{precip}{boolean that allows the use of precipitation coefficients to -modify spread (TRUE or FALSE)} +\item{precip}{boolean that allows the use of precipitation coefficients to modify spread +(TRUE or FALSE)} -\item{precipitation_coefficient_file}{Raster file with precipitation -coefficient data for the timestep and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} +\item{precipitation_coefficient_file}{Raster file with precipitation coefficient data for the +timestep and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{model_type}{What type of model most represents your system. Options -are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" -(Susceptible - Infected/Infested). Default value is "SI".} +\item{model_type}{What type of model most represents your system. Options are "SEI" +(Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default +value is "SI".} -\item{latency_period}{How many times steps does it take to for exposed -populations become infected/infested. This is an integer value and must be -greater than 0 if model type is SEI.} +\item{latency_period}{How many times steps does it take to for exposed populations become +infected/infested. This is an integer value and must be greater than 0 if model type is SEI.} -\item{time_step}{how often should spread occur options: ('day', 'week', 'month').} +\item{time_step}{How often should spread occur options: ('day', 'week', 'month').} -\item{season_month_start}{when does spread first start occurring in the year -for your pest or pathogen (integer value between 1 and 12)} +\item{season_month_start}{When does spread first start occurring in the year for your pest or +pathogen (integer value between 1 and 12)} -\item{season_month_end}{when does spread end during the year for your pest +\item{season_month_end}{When does spread end during the year for your pest or pathogen (integer value between 1 and 12)} -\item{start_date}{date to start the simulation with format ('YYYY_MM_DD')} +\item{start_date}{Date to start the simulation with format ('YYYY_MM_DD')} -\item{end_date}{date to end the simulation with format ('YYYY_MM_DD')} +\item{end_date}{Date to end the simulation with format ('YYYY_MM_DD')} -\item{use_survival_rates}{boolean to indicate if the model will use survival rates to limit the +\item{use_survival_rates}{Boolean to indicate if the model will use survival rates to limit the survival or emergence of overwintering generations.} \item{survival_rate_month}{What month do over wintering generations emerge. We suggest using the month before for this parameter as it is when the survival rates raster will be applied.} -\item{survival_rate_day}{what day should the survival rates be applied} +\item{survival_rate_day}{What day should the survival rates be applied} \item{survival_rates_file}{Raster file with survival rates from 0 to 1 representing the percentage of emergence for a cell.} -\item{use_lethal_temperature}{a boolean to answer the question: does your -pest or pathogen have a temperature at which it cannot survive? -(TRUE or FALSE)} +\item{use_lethal_temperature}{A boolean to answer the question: does your pest or pathogen have +a temperature at which it cannot survive? (TRUE or FALSE)} -\item{temperature_file}{path to raster file with temperature data for -minimum temperature} +\item{temperature_file}{Path to raster file with temperature data for minimum temperature} -\item{lethal_temperature}{the temperature in degrees C at which lethal -temperature related mortality occurs for your pest or pathogen (-50 to 60)} +\item{lethal_temperature}{The temperature in degrees C at which lethal temperature related +mortality occurs for your pest or pathogen (-50 to 60)} -\item{lethal_temperature_month}{the month in which lethal temperature -related mortality occurs for your pest or pathogen integer value between 1 -and 12} +\item{lethal_temperature_month}{The month in which lethal temperature related mortality occurs +for your pest or pathogen integer value between 1 and 12} -\item{mortality_on}{boolean to turn host mortality on and off -(TRUE or FALSE)} +\item{mortality_on}{Boolean to turn host mortality on and off (TRUE or FALSE)} -\item{mortality_rate}{rate at which mortality occurs value between 0 and 1} +\item{mortality_rate}{Rate at which mortality occurs value between 0 and 1} -\item{mortality_time_lag}{time lag from infection until mortality can occur -in time steps integer >= 1} +\item{mortality_time_lag}{Time lag from infection until mortality can occur in time steps +integer >= 1} -\item{mortality_frequency}{sets the frequency of mortality calculations occur -either ('year', 'month', week', 'day', 'time step', or 'every_n_steps')} +\item{mortality_frequency}{Sets the frequency of mortality calculations occur either ('year', +'month', week', 'day', 'time step', or 'every_n_steps')} -\item{mortality_frequency_n}{sets number of units from mortality_frequency in -which to run the mortality calculation if mortality_frequency is -'every_n_steps'. Must be an integer >= 1.} +\item{mortality_frequency_n}{Sets number of units from mortality_frequency in which to run the +mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{management}{boolean to allow use of management (TRUE or FALSE)} +\item{management}{Boolean to allow use of management (TRUE or FALSE)} -\item{treatment_dates}{dates in which to apply treatment list with format -('YYYY_MM_DD') (needs to be the same length as treatment_file and -pesticide_duration)} +\item{treatment_dates}{Dates in which to apply treatment list with format ('YYYY_MM_DD') +(needs to be the same length as treatment_file and pesticide_duration)} -\item{treatments_file}{path to raster files with treatment data by dates. -Needs to be a list of files the same length as treatment_dates and -pesticide_duration.} +\item{treatments_file}{Path to raster files with treatment data by dates. Needs to be a list of +files the same length as treatment_dates and pesticide_duration.} -\item{treatment_method}{what method to use when applying treatment one of -("ratio" or "all infected"). ratio removes a portion of all infected and -susceptibles, all infected removes all infected a portion of susceptibles.} +\item{treatment_method}{What method to use when applying treatment one of ("ratio" or "all +infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +infected a portion of susceptibles.} -\item{natural_kernel_type}{what type of dispersal kernel should be used for -natural dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', - 'logistic')} +\item{natural_kernel_type}{What type of dispersal kernel should be used for natural dispersal. +Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic')} -\item{anthropogenic_kernel_type}{what type of dispersal kernel should be -used for anthropogenic dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network')} +\item{anthropogenic_kernel_type}{What type of dispersal kernel should be used for anthropogenic +dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +'network')} -\item{natural_dir}{sets the predominate direction of natural dispersal -usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -'NONE')} +\item{natural_dir}{Sets the predominate direction of natural dispersal usually due to wind values +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} -\item{anthropogenic_dir}{sets the predominate direction of anthropogenic -dispersal usually due to human movement typically over long distances (e.g. -nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -'SE', 'E', 'NE', 'NONE')} +\item{anthropogenic_dir}{Sets the predominate direction of anthropogenic dispersal usually due +to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} \item{number_of_iterations}{how many iterations do you want to run to allow the calibration to converge at least 10} @@ -237,41 +218,39 @@ the calibration to converge at least 10} \item{number_of_cores}{enter how many cores you want to use (default = NA). If not set uses the # of CPU cores - 1. must be an integer >= 1} -\item{pesticide_duration}{how long does the pestcide (herbicide, vaccine, -etc..) last before the host is susceptible again. If value is 0 treatment -is a culling (i.e. host removal) not a pesticide treatment. (needs to be the - same length as treatment_dates and treatment_file)} +\item{pesticide_duration}{How long does the pesticide (herbicide, vaccine, etc..) last before the +host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +pesticide treatment. (needs to be the same length as treatment_dates and treatment_file)} -\item{pesticide_efficacy}{how effictive is the pesticide at preventing the -disease or killing the pest (if this is 0.70 then when applied it -successfully treats 70 percent of the plants or animals)} +\item{pesticide_efficacy}{How effective is the pesticide at preventing the disease or killing the +pest (if this is 0.70 then when applied it successfully treats 70 percent of the plants or +animals).} -\item{random_seed}{sets the random seed for the simulation used for reproducibility} +\item{random_seed}{Sets the random seed for the simulation used for reproducibility} -\item{output_frequency}{sets when outputs occur either ('year', 'month', -'week', 'day', 'time step', or 'every_n_steps')} +\item{output_frequency}{Sets when outputs occur either ('year', 'month', week', 'day', +'time step', or 'every_n_steps')} -\item{output_frequency_n}{sets number of units from output_frequency in which -to export model results if mortality_frequency is 'every_n_steps'. -Must be an integer >= 1.} +\item{output_frequency_n}{Sets number of units from output_frequency in which to export model +results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{movements_file}{this is a csv file with columns lon_from, lat_from, -lon_to, lat_to, number of animals, and date.} +\item{movements_file}{This is a csv file with columns lon_from, lat_from, lon_to, lat_to, number +of animals, and date.} -\item{use_movements}{this is a boolean to turn on use of the movement module.} +\item{use_movements}{This is a boolean to turn on use of the movement module.} -\item{start_exposed}{Do your initial conditions start as exposed or infected -(only used if model_type is "SEI"). Default False. If this is TRUE need to -have both an infected_file (this can be a raster of all 0's) and exposed_file} +\item{start_exposed}{Do your initial conditions start as exposed or infected (only used if +model_type is "SEI"). Default False. If this is TRUE need to have both an infected_file (this +can be a raster of all 0's) and exposed_file} -\item{generate_stochasticity}{Boolean to indicate whether to use -stochasticity in reproductive functions default is TRUE} +\item{generate_stochasticity}{Boolean to indicate whether to use stochasticity in reproductive +functions default is TRUE} -\item{establishment_stochasticity}{Boolean to indicate whether to use -stochasticity in establishment functions default is TRUE} +\item{establishment_stochasticity}{Boolean to indicate whether to use stochasticity in +establishment functions default is TRUE} -\item{movement_stochasticity}{Boolean to indicate whether to use -stochasticity in movement functions default is TRUE} +\item{movement_stochasticity}{Boolean to indicate whether to use stochasticity in movement +functions default is TRUE} \item{dispersal_stochasticity}{Boolean to indicate whether to use a stochasticity in the dispersal kernel default is TRUE} @@ -279,38 +258,33 @@ dispersal kernel default is TRUE} \item{establishment_probability}{Threshold to determine establishment if establishment_stochasticity is FALSE (range 0 to 1, default = 0.5)} -\item{dispersal_percentage}{Percentage of dispersal used to calculate the -bounding box for deterministic dispersal} +\item{dispersal_percentage}{Percentage of dispersal used to calculate the bounding box for +deterministic dispersal} -\item{quarantine_areas_file}{path to raster file with quarantine boundaries -used in calculating likelihood of quarantine escape if use_quarantine is -TRUE} +\item{quarantine_areas_file}{Path to raster file with quarantine boundaries used in calculating +likelihood of quarantine escape if use_quarantine is TRUE} -\item{use_quarantine}{boolean to indicate whether or not there is a -quarantine area if TRUE must pass in a raster file indicating the -quarantine areas (default = FALSE)} +\item{use_quarantine}{Boolean to indicate whether or not there is a quarantine area if TRUE must +pass in a raster file indicating the quarantine areas (default = FALSE)} -\item{use_spreadrates}{boolean to indicate whether or not to calculate -spread rates} +\item{use_spreadrates}{Boolean to indicate whether or not to calculate spread rates} -\item{use_overpopulation_movements}{boolean to indicate whether to use -the overpopulation pest movement module (driven by the natural kernel with -its scale parameter modified by a coefficient)} +\item{use_overpopulation_movements}{Boolean to indicate whether to use the overpopulation pest +movement module (driven by the natural kernel with its scale parameter modified by a coefficient)} -\item{overpopulation_percentage}{percentage of occupied hosts when the cell -is considered to be overpopulated} +\item{overpopulation_percentage}{Percentage of occupied hosts when the cell is considered to be +overpopulated} -\item{leaving_percentage}{percentage of pests leaving an overpopulated cell} +\item{leaving_percentage}{Percentage of pests leaving an overpopulated cell} -\item{leaving_scale_coefficient}{coefficient to multiply scale parameter of -the natural kernel (if applicable)} +\item{leaving_scale_coefficient}{Coefficient to multiply scale parameter of the natural kernel +(if applicable)} -\item{exposed_file}{a file with the exposed for the current} +\item{exposed_file}{A file with the exposed for the current} -\item{mask}{Raster file used to provide a mask to remove 0's that are not -true negatives from comparisons (e.g. mask out lakes and oceans from statics -if modeling terrestrial species). This can also be used to mask out areas -that can't be managed in the auto_manage function.} +\item{mask}{Raster file used to provide a mask to remove 0's that are not true negatives from +comparisons (e.g. mask out lakes and oceans from statics if modeling terrestrial species). This +can also be used to mask out areas that can't be managed in the auto_manage function.} \item{write_outputs}{Either c("summary_outputs", or "None"). If not "None" output folder path must be provided.} @@ -318,7 +292,7 @@ that can't be managed in the auto_manage function.} \item{output_folder_path}{this is the full path with either / or \\ (e.g., "C:/user_name/desktop/pops_sod_2020_2023/outputs/")} -\item{network_filename}{entire file path for the network file. Used if +\item{network_filename}{The entire file path for the network file. Used if anthropogenic_kernel_type = 'network'.} \item{network_movement}{What movement type do you want to use in the network kernel either @@ -326,19 +300,19 @@ anthropogenic_kernel_type = 'network'.} along the edge. "jump" automatically moves to the nearest node when moving through the network. "teleport" moves from node to node most likely used for airport and seaport networks.} -\item{use_initial_condition_uncertainty}{boolean to indicate whether or not to propagate and +\item{use_initial_condition_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from initial conditions. If TRUE the infected_file needs to have 2 layers one with the mean value and one with the standard deviation. If an SEI model is used the exposed_file needs to have 2 layers one with the mean value and one with the standard deviation} -\item{use_host_uncertainty}{boolean to indicate whether or not to propagate and partition +\item{use_host_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from host data. If TRUE the host_file needs to have 2 layers one with the mean value and one with the standard deviation.} -\item{weather_type}{string indicating how the weather data is passed in either -as a mean and standard deviation to represent uncertainty ("probabilistic") or as a time -series ("deterministic")} +\item{weather_type}{string indicating how the weather data is passed in either as a mean and +standard deviation to represent uncertainty ("probabilistic") or as a time series +("deterministic")} \item{temperature_coefficient_sd_file}{Raster file with temperature coefficient standard deviation data for the timestep and time period specified (e.g. if timestep = week this file @@ -352,14 +326,13 @@ would have 52 bands with data being weekly precipitation coefficient standard de convert raw precipitation values to coefficients that affect the reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{dispersers_to_soils_percentage}{range from 0 to 1 representing the percentage -of dispersers that fall to the soil and survive.} +\item{dispersers_to_soils_percentage}{Range from 0 to 1 representing the percentage of dispersers +that fall to the soil and survive.} -\item{quarantine_directions}{string with comma separated directions to include -in the quarantine direction analysis, e.g., 'N,E'. By default all directions -(N, S, E, W) are considered} +\item{quarantine_directions}{String with comma separated directions to include in the quarantine +direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered} -\item{multiple_random_seeds}{boolean to indicate if the model should use multiple random seeds +\item{multiple_random_seeds}{Boolean to indicate if the model should use multiple random seeds (allows for performing uncertainty partitioning) or a single random seed (backwards compatibility option). Default is FALSE.} @@ -367,11 +340,14 @@ compatibility option). Default is FALSE.} table. Use if you are trying to recreate an exact analysis otherwise we suggest leaving the default. Default is Null which draws the seed numbers for each.} -\item{use_soils}{boolean to indicate if pests establish in the soil and spread out from there. +\item{use_soils}{Boolean to indicate if pests establish in the soil and spread out from there. Typically used for soil borne pathogens.} -\item{soil_starting_pest_file}{path to the raster file with the starting -amount of pest or pathogen.} +\item{soil_starting_pest_file}{path to the raster file with the starting amount of pest or +pathogen.} + +\item{start_with_soil_populations}{Boolean to indicate whether to use a starting soil pest or +pathogen population if TRUE then soil_starting_pest_file is required.} } \value{ list of infected and susceptible per year diff --git a/man/validate.Rd b/man/validate.Rd index bb24c878..766d07af 100644 --- a/man/validate.Rd +++ b/man/validate.Rd @@ -85,7 +85,8 @@ validate( multiple_random_seeds = FALSE, file_random_seeds = NULL, use_soils = FALSE, - soil_starting_pest_file = "" + soil_starting_pest_file = "", + start_with_soil_populations = FALSE ) } \arguments{ @@ -104,178 +105,158 @@ If not set uses the # of CPU cores - 1. must be an integer >= 1} \item{parameter_cov_matrix}{the parameter covariance matrix from the ABC calibration function (posterior covariance matrix)} -\item{infected_file}{Raster file with initial infections. Units for -infections are based on data availability and the way the units used for your -host file is created (e.g. percent area, # of hosts per cell, etc.).} - -\item{host_file}{path to raster files with number of hosts and standard -deviation on those estimates can be based in 3 formats (a single file with -number of hosts, a single file with 2 layers number of hosts and standard -deviation, or two files 1 with number of hosts and the other with standard -deviation of those estimates). The units for this can be of many formats the -two most common that we use are either percent area (0 to 100) or # of hosts -in the cell. Usually depends on data available and estimation methods.} - -\item{total_populations_file}{path to raster file with number of total -populations of all hosts and non-hosts. This depends on how your host data is -set up. If host is percent area then this should be a raster with values -that are 100 anywhere with host. If host file is # of hosts in a cell then -this should be a raster with values that are the max of the host raster any -where the # of hosts is greater than 0.} - -\item{temp}{boolean that allows the use of temperature coefficients to -modify spread (TRUE or FALSE)} - -\item{temperature_coefficient_file}{path to raster file with temperature -coefficient data for the timestep and and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} - -\item{precip}{boolean that allows the use of precipitation coefficients to -modify spread (TRUE or FALSE)} - -\item{precipitation_coefficient_file}{Raster file with precipitation -coefficient data for the timestep and time period specified (e.g. if timestep -= week and start_date = 2017_01_01 and end_date = 2019_12_31 this file would -have 52 * 3 bands = 156 bands with data being weekly precipitation -coefficients). We convert raw precipitation values to coefficients that -affect the reproduction and survival of the pest all values in the raster are -between 0 and 1.} - -\item{model_type}{What type of model most represents your system. Options -are "SEI" (Susceptible - Exposed - Infected/Infested) or "SI" -(Susceptible - Infected/Infested). Default value is "SI".} - -\item{latency_period}{How many times steps does it take to for exposed -populations become infected/infested. This is an integer value and must be -greater than 0 if model type is SEI.} - -\item{time_step}{how often should spread occur options: ('day', 'week', 'month').} - -\item{season_month_start}{when does spread first start occurring in the year -for your pest or pathogen (integer value between 1 and 12)} - -\item{season_month_end}{when does spread end during the year for your pest +\item{infected_file}{Raster file with initial infections. Units for infections are based on data +availability and the way the units used for your host file is created (e.g. percent area, # of +hosts per cell, etc.).} + +\item{host_file}{path to raster files with number of hosts and standard deviation on those +estimates can be based in 3 formats (a single file with number of hosts, a single file with 2 +layers number of hosts and standard deviation, or two files 1 with number of hosts and the other +with standard deviation of those estimates). The units for this can be of many formats the two +most common that we use are either percent area (0 to 100) or # of hosts in the cell. Usually +depends on data available and estimation methods.} + +\item{total_populations_file}{path to raster file with number of total populations of all hosts +and non-hosts. This depends on how your host data is set up. If host is percent area then this +should be a raster with values that are 100 anywhere with host. If host file is # of hosts in a +cell then this should be a raster with values that are the max of the host raster any where the +# of hosts is greater than 0.} + +\item{temp}{boolean that allows the use of temperature coefficients to modify spread +(TRUE or FALSE)} + +\item{temperature_coefficient_file}{path to raster file with temperature coefficient data for the +timestep and and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} + +\item{precip}{boolean that allows the use of precipitation coefficients to modify spread +(TRUE or FALSE)} + +\item{precipitation_coefficient_file}{Raster file with precipitation coefficient data for the +timestep and time period specified (e.g. if timestep = week and start_date = 2017_01_01 and +end_date = 2019_12_31 this file would have 52 * 3 bands = 156 bands with data being weekly +precipitation coefficients). We convert raw precipitation values to coefficients that affect the +reproduction and survival of the pest all values in the raster are between 0 and 1.} + +\item{model_type}{What type of model most represents your system. Options are "SEI" +(Susceptible - Exposed - Infected/Infested) or "SI" (Susceptible - Infected/Infested). Default +value is "SI".} + +\item{latency_period}{How many times steps does it take to for exposed populations become +infected/infested. This is an integer value and must be greater than 0 if model type is SEI.} + +\item{time_step}{How often should spread occur options: ('day', 'week', 'month').} + +\item{season_month_start}{When does spread first start occurring in the year for your pest or +pathogen (integer value between 1 and 12)} + +\item{season_month_end}{When does spread end during the year for your pest or pathogen (integer value between 1 and 12)} -\item{start_date}{date to start the simulation with format ('YYYY_MM_DD')} +\item{start_date}{Date to start the simulation with format ('YYYY_MM_DD')} -\item{end_date}{date to end the simulation with format ('YYYY_MM_DD')} +\item{end_date}{Date to end the simulation with format ('YYYY_MM_DD')} -\item{use_survival_rates}{boolean to indicate if the model will use survival rates to limit the +\item{use_survival_rates}{Boolean to indicate if the model will use survival rates to limit the survival or emergence of overwintering generations.} \item{survival_rate_month}{What month do over wintering generations emerge. We suggest using the month before for this parameter as it is when the survival rates raster will be applied.} -\item{survival_rate_day}{what day should the survival rates be applied} +\item{survival_rate_day}{What day should the survival rates be applied} \item{survival_rates_file}{Raster file with survival rates from 0 to 1 representing the percentage of emergence for a cell.} -\item{use_lethal_temperature}{a boolean to answer the question: does your -pest or pathogen have a temperature at which it cannot survive? -(TRUE or FALSE)} +\item{use_lethal_temperature}{A boolean to answer the question: does your pest or pathogen have +a temperature at which it cannot survive? (TRUE or FALSE)} -\item{temperature_file}{path to raster file with temperature data for -minimum temperature} +\item{temperature_file}{Path to raster file with temperature data for minimum temperature} -\item{lethal_temperature}{the temperature in degrees C at which lethal -temperature related mortality occurs for your pest or pathogen (-50 to 60)} +\item{lethal_temperature}{The temperature in degrees C at which lethal temperature related +mortality occurs for your pest or pathogen (-50 to 60)} -\item{lethal_temperature_month}{the month in which lethal temperature -related mortality occurs for your pest or pathogen integer value between 1 -and 12} +\item{lethal_temperature_month}{The month in which lethal temperature related mortality occurs +for your pest or pathogen integer value between 1 and 12} -\item{mortality_on}{boolean to turn host mortality on and off -(TRUE or FALSE)} +\item{mortality_on}{Boolean to turn host mortality on and off (TRUE or FALSE)} -\item{mortality_rate}{rate at which mortality occurs value between 0 and 1} +\item{mortality_rate}{Rate at which mortality occurs value between 0 and 1} -\item{mortality_time_lag}{time lag from infection until mortality can occur -in time steps integer >= 1} +\item{mortality_time_lag}{Time lag from infection until mortality can occur in time steps +integer >= 1} -\item{mortality_frequency}{sets the frequency of mortality calculations occur -either ('year', 'month', week', 'day', 'time step', or 'every_n_steps')} +\item{mortality_frequency}{Sets the frequency of mortality calculations occur either ('year', +'month', week', 'day', 'time step', or 'every_n_steps')} -\item{mortality_frequency_n}{sets number of units from mortality_frequency in -which to run the mortality calculation if mortality_frequency is -'every_n_steps'. Must be an integer >= 1.} +\item{mortality_frequency_n}{Sets number of units from mortality_frequency in which to run the +mortality calculation if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{management}{boolean to allow use of management (TRUE or FALSE)} +\item{management}{Boolean to allow use of management (TRUE or FALSE)} -\item{treatment_dates}{dates in which to apply treatment list with format -('YYYY_MM_DD') (needs to be the same length as treatment_file and -pesticide_duration)} +\item{treatment_dates}{Dates in which to apply treatment list with format ('YYYY_MM_DD') +(needs to be the same length as treatment_file and pesticide_duration)} -\item{treatments_file}{path to raster files with treatment data by dates. -Needs to be a list of files the same length as treatment_dates and -pesticide_duration.} +\item{treatments_file}{Path to raster files with treatment data by dates. Needs to be a list of +files the same length as treatment_dates and pesticide_duration.} -\item{treatment_method}{what method to use when applying treatment one of -("ratio" or "all infected"). ratio removes a portion of all infected and -susceptibles, all infected removes all infected a portion of susceptibles.} +\item{treatment_method}{What method to use when applying treatment one of ("ratio" or "all +infected"). ratio removes a portion of all infected and susceptibles, all infected removes all +infected a portion of susceptibles.} -\item{natural_kernel_type}{what type of dispersal kernel should be used for -natural dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', - 'logistic')} +\item{natural_kernel_type}{What type of dispersal kernel should be used for natural dispersal. +Current dispersal kernel options are ('Cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic')} -\item{anthropogenic_kernel_type}{what type of dispersal kernel should be -used for anthropogenic dispersal. Current dispersal kernel options are - ('cauchy', 'exponential', 'uniform', 'deterministic neighbor','power law', - 'hyperbolic secant', 'gamma', 'weibull', 'logistic', 'network')} +\item{anthropogenic_kernel_type}{What type of dispersal kernel should be used for anthropogenic +dispersal. Current dispersal kernel options are ('cauchy', 'exponential', 'uniform', +'deterministic neighbor','power law', 'hyperbolic secant', 'gamma', 'weibull', 'logistic', +'network')} -\item{natural_dir}{sets the predominate direction of natural dispersal -usually due to wind values ('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', -'NONE')} +\item{natural_dir}{Sets the predominate direction of natural dispersal usually due to wind values +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} -\item{anthropogenic_dir}{sets the predominate direction of anthropogenic -dispersal usually due to human movement typically over long distances (e.g. -nursery trade, movement of firewood, etc..) ('N', 'NW', 'W', 'SW', 'S', -'SE', 'E', 'NE', 'NONE')} +\item{anthropogenic_dir}{Sets the predominate direction of anthropogenic dispersal usually due +to human movement typically over long distances (e.g. nursery trade, movement of firewood, etc..) +('N', 'NW', 'W', 'SW', 'S', 'SE', 'E', 'NE', 'NONE')} -\item{pesticide_duration}{how long does the pestcide (herbicide, vaccine, -etc..) last before the host is susceptible again. If value is 0 treatment -is a culling (i.e. host removal) not a pesticide treatment. (needs to be the - same length as treatment_dates and treatment_file)} +\item{pesticide_duration}{How long does the pesticide (herbicide, vaccine, etc..) last before the +host is susceptible again. If value is 0 treatment is a culling (i.e. host removal) not a +pesticide treatment. (needs to be the same length as treatment_dates and treatment_file)} -\item{pesticide_efficacy}{how effictive is the pesticide at preventing the -disease or killing the pest (if this is 0.70 then when applied it -successfully treats 70 percent of the plants or animals)} +\item{pesticide_efficacy}{How effective is the pesticide at preventing the disease or killing the +pest (if this is 0.70 then when applied it successfully treats 70 percent of the plants or +animals).} \item{mask}{Raster file used to provide a mask to remove 0's that are not true negatives from comparisons (e.g. mask out lakes and oceans from statics if modeling terrestrial species).} -\item{output_frequency}{sets when outputs occur either ('year', 'month', -'week', 'day', 'time step', or 'every_n_steps')} +\item{output_frequency}{Sets when outputs occur either ('year', 'month', week', 'day', +'time step', or 'every_n_steps')} -\item{output_frequency_n}{sets number of units from output_frequency in which -to export model results if mortality_frequency is 'every_n_steps'. -Must be an integer >= 1.} +\item{output_frequency_n}{Sets number of units from output_frequency in which to export model +results if mortality_frequency is 'every_n_steps'. Must be an integer >= 1.} -\item{movements_file}{this is a csv file with columns lon_from, lat_from, -lon_to, lat_to, number of animals, and date.} +\item{movements_file}{This is a csv file with columns lon_from, lat_from, lon_to, lat_to, number +of animals, and date.} -\item{use_movements}{this is a boolean to turn on use of the movement module.} +\item{use_movements}{This is a boolean to turn on use of the movement module.} -\item{start_exposed}{Do your initial conditions start as exposed or infected -(only used if model_type is "SEI"). Default False. If this is TRUE need to -have both an infected_file (this can be a raster of all 0's) and exposed_file} +\item{start_exposed}{Do your initial conditions start as exposed or infected (only used if +model_type is "SEI"). Default False. If this is TRUE need to have both an infected_file (this +can be a raster of all 0's) and exposed_file} -\item{generate_stochasticity}{Boolean to indicate whether to use -stochasticity in reproductive functions default is TRUE} +\item{generate_stochasticity}{Boolean to indicate whether to use stochasticity in reproductive +functions default is TRUE} -\item{establishment_stochasticity}{Boolean to indicate whether to use -stochasticity in establishment functions default is TRUE} +\item{establishment_stochasticity}{Boolean to indicate whether to use stochasticity in +establishment functions default is TRUE} -\item{movement_stochasticity}{Boolean to indicate whether to use -stochasticity in movement functions default is TRUE} +\item{movement_stochasticity}{Boolean to indicate whether to use stochasticity in movement +functions default is TRUE} \item{dispersal_stochasticity}{Boolean to indicate whether to use a stochasticity in the dispersal kernel default is TRUE} @@ -283,33 +264,29 @@ dispersal kernel default is TRUE} \item{establishment_probability}{Threshold to determine establishment if establishment_stochasticity is FALSE (range 0 to 1, default = 0.5)} -\item{dispersal_percentage}{Percentage of dispersal used to calculate the -bounding box for deterministic dispersal} +\item{dispersal_percentage}{Percentage of dispersal used to calculate the bounding box for +deterministic dispersal} -\item{quarantine_areas_file}{path to raster file with quarantine boundaries -used in calculating likelihood of quarantine escape if use_quarantine is -TRUE} +\item{quarantine_areas_file}{Path to raster file with quarantine boundaries used in calculating +likelihood of quarantine escape if use_quarantine is TRUE} -\item{use_quarantine}{boolean to indicate whether or not there is a -quarantine area if TRUE must pass in a raster file indicating the -quarantine areas (default = FALSE)} +\item{use_quarantine}{Boolean to indicate whether or not there is a quarantine area if TRUE must +pass in a raster file indicating the quarantine areas (default = FALSE)} -\item{use_spreadrates}{boolean to indicate whether or not to calculate -spread rates} +\item{use_spreadrates}{Boolean to indicate whether or not to calculate spread rates} -\item{use_overpopulation_movements}{boolean to indicate whether to use -the overpopulation pest movement module (driven by the natural kernel with -its scale parameter modified by a coefficient)} +\item{use_overpopulation_movements}{Boolean to indicate whether to use the overpopulation pest +movement module (driven by the natural kernel with its scale parameter modified by a coefficient)} -\item{overpopulation_percentage}{percentage of occupied hosts when the cell -is considered to be overpopulated} +\item{overpopulation_percentage}{Percentage of occupied hosts when the cell is considered to be +overpopulated} -\item{leaving_percentage}{percentage of pests leaving an overpopulated cell} +\item{leaving_percentage}{Percentage of pests leaving an overpopulated cell} -\item{leaving_scale_coefficient}{coefficient to multiply scale parameter of -the natural kernel (if applicable)} +\item{leaving_scale_coefficient}{Coefficient to multiply scale parameter of the natural kernel +(if applicable)} -\item{exposed_file}{a file with the exposed for the current} +\item{exposed_file}{A file with the exposed for the current} \item{write_outputs}{Either c("summary_outputs", or "None"). If not "None" output folder path must be provided.} @@ -319,7 +296,7 @@ the natural kernel (if applicable)} \item{point_file}{file for point comparison if not provided skips calculations} -\item{network_filename}{entire file path for the network file. Used if +\item{network_filename}{The entire file path for the network file. Used if anthropogenic_kernel_type = 'network'.} \item{network_movement}{What movement type do you want to use in the network kernel either @@ -333,19 +310,19 @@ simulations and observations. Default is FALSE.} \item{use_configuration}{Boolean if you want to use configuration disagreement for comparing model runs. Default is FALSE.} -\item{use_initial_condition_uncertainty}{boolean to indicate whether or not to propagate and +\item{use_initial_condition_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from initial conditions. If TRUE the infected_file needs to have 2 layers one with the mean value and one with the standard deviation. If an SEI model is used the exposed_file needs to have 2 layers one with the mean value and one with the standard deviation} -\item{use_host_uncertainty}{boolean to indicate whether or not to propagate and partition +\item{use_host_uncertainty}{Boolean to indicate whether or not to propagate and partition uncertainty from host data. If TRUE the host_file needs to have 2 layers one with the mean value and one with the standard deviation.} -\item{weather_type}{string indicating how the weather data is passed in either -as a mean and standard deviation to represent uncertainty ("probabilistic") or as a time -series ("deterministic")} +\item{weather_type}{string indicating how the weather data is passed in either as a mean and +standard deviation to represent uncertainty ("probabilistic") or as a time series +("deterministic")} \item{temperature_coefficient_sd_file}{Raster file with temperature coefficient standard deviation data for the timestep and time period specified (e.g. if timestep = week this file @@ -359,14 +336,13 @@ would have 52 bands with data being weekly precipitation coefficient standard de convert raw precipitation values to coefficients that affect the reproduction and survival of the pest all values in the raster are between 0 and 1.} -\item{dispersers_to_soils_percentage}{range from 0 to 1 representing the percentage -of dispersers that fall to the soil and survive.} +\item{dispersers_to_soils_percentage}{Range from 0 to 1 representing the percentage of dispersers +that fall to the soil and survive.} -\item{quarantine_directions}{string with comma separated directions to include -in the quarantine direction analysis, e.g., 'N,E'. By default all directions -(N, S, E, W) are considered} +\item{quarantine_directions}{String with comma separated directions to include in the quarantine +direction analysis, e.g., 'N,E'. By default all directions (N, S, E, W) are considered} -\item{multiple_random_seeds}{boolean to indicate if the model should use multiple random seeds +\item{multiple_random_seeds}{Boolean to indicate if the model should use multiple random seeds (allows for performing uncertainty partitioning) or a single random seed (backwards compatibility option). Default is FALSE.} @@ -374,11 +350,14 @@ compatibility option). Default is FALSE.} table. Use if you are trying to recreate an exact analysis otherwise we suggest leaving the default. Default is Null which draws the seed numbers for each.} -\item{use_soils}{boolean to indicate if pests establish in the soil and spread out from there. +\item{use_soils}{Boolean to indicate if pests establish in the soil and spread out from there. Typically used for soil borne pathogens.} -\item{soil_starting_pest_file}{path to the raster file with the starting -amount of pest or pathogen.} +\item{soil_starting_pest_file}{path to the raster file with the starting amount of pest or +pathogen.} + +\item{start_with_soil_populations}{Boolean to indicate whether to use a starting soil pest or +pathogen population if TRUE then soil_starting_pest_file is required.} } \value{ a data frame of statistical measures of model performance.