sim_selection_weights {ARUtools}R Documentation

Create parameters and simulate selection weights

Description

This function creates and explores parameters for generating selections. These parameters define the selection distribution of minutes (min) around the sun event (sunrise/sunset), as well as of days (day).

Usage

sim_selection_weights(
  min_range = c(-70, 240),
  min_mean = 30,
  min_sd = 60,
  day_range = c(120, 201),
  day_mean = 161,
  day_sd = 20,
  offset = 0,
  return_log = TRUE,
  selection_fun = "norm",
  selection_var = "psel_normalized",
  return_params = TRUE,
  plot = TRUE
)

Arguments

min_range

Numeric vector. Range of the sampling distribution of minutes around the sun event.

min_mean

Numeric. Mean of the sampling distribution of minutes to the sun event.

min_sd

Numeric. SD in minutes of the sampling distribution of minutes around the sun event.

day_range

Date/Datetime/Numeric vector. Range of sampling distribution of days. Can be Dates, Date-times, or DOY (day-of-year, 1-366).

day_mean

Date/Datetime/Numeric. Mean date of the sampling distribution of days. Can be Date, Date-time, or DOY (day-of-year, 1-366).

day_sd

Numeric. SD in days of the sampling distribution of days.

offset

Numeric. Offset to shift for time of day in minutes.

return_log

Logical. Log the density in the selection function?

selection_fun

Character. Selection function to use. Options are lognorm, norm (default), or cauchy.

selection_var

Character. Selection variable to plot (if plot = TRUE). Options are are psel, psel_doy, psel_min, psel_std, psel_scaled, or psel_normalized (default).

return_params

Logical. Return parameter list for use in calc_selection_weights()?

plot

Logical. Create plot of simulated selection weights? If return_param = TRUE and plot = TRUE plot is created as a side effect. Other wise, plot is returned directly.

Value

Returns either a list of selection parameters or a plot of simulated selection weights

Examples

params <- sim_selection_weights()

[Package ARUtools version 0.6.2 Index]