all_comb: Analyze all combinations

View source: R/all_comb.R

all_combR Documentation

Analyze all combinations

Description

A wrapper function to run both SS_optim and MS_optim to optimize all combinations of resistance surfaces with the Genetic Algorithms package GA. Following optimization, Resist.boot is run to conduct a bootstrap analysis. This function can only be used when optimizing resistance surface with least cost path or commute distance (gdistance).

Usage

all_comb(gdist.inputs = NULL, 
                jl.inputs = NULL,
                CS.inputs = NULL,
                GA.inputs, 
                results.dir,
                max.combination = 4,
                iters = 1000,
                replicate = 1,
                sample.prop = 0.75,
                nlm = FALSE,
                dist_mod = TRUE,
                null_mod = TRUE,
                ...)

Arguments

gdist.inputs

Object created from running gdist.prep function. Defined if optimizing using gdistance

jl.inputs

Object created from running jl.prep function. Defined if optimizing using CIRCUITSCAPE run in Julia

CS.inputs

NOT CURRENTLY ACTIVATED. Object created from running CS.prep function. Defined if optimizing using CIRCUITSCAPE

GA.inputs

Object created from running GA.prep function. Be sure that the Results.dir has been been correctly specified as "all.comb"

results.dir

Directory to write and save analysis results. This should be an empty directory. Any existing files located in this directory will be deleted!

max.combination

The maximum number of surfaces to include in the all combinations analysis (Default = 4). Alternatively, specify a vector with the minimum and maximum number of surfaces to combine (e.g., c(2,4). If the minimum > 1, then the single surface optimization will be skipped.

iters

Number of bootstrap iterations to be conducted (Default = 1000)

replicate

The number of times to replicate the GA optimization process for each surface (Default = 1)

sample.prop

Proportion of observations to be sampled each iteration (Default = 0.75)

nlm

(NOT CURRENTLY IMPLEMENTED) Logical, if TRUE, the final step of optimization will use nlm to fine-tune parameter estimates. This may lead to overfitting in some cases. (Default = FALSE)

dist_mod

Logical, if TRUE, a Distance model will be calculated and added to the output table (default = TRUE)

null_mod

Logical, if TRUE, an intercept-only model will be calculated and added to the output table (Default = TRUE)

...

Additional arguments (Not currently used)

Value

This function optimizes resistance surfaces in isolation using SS_optim, followed by multisurface optimization using MS_optim, and then conducts a bootstrap analysis.

Author(s)

Bill Peterman <Peterman.73@osu.edu>

Examples

 
## Not run:
## *** TO BE COMPLETED *** ##

## End (Not run)

wpeterman/ResistanceGA documentation built on Nov. 20, 2023, 11:50 p.m.