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
).
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
)
Returns either a list of selection parameters or a plot of simulated selection weights
Numeric vector. Range of the sampling distribution of minutes around the sun event.
Numeric. Mean of the sampling distribution of minutes to the sun event.
Numeric. SD in minutes of the sampling distribution of minutes around the sun event.
Date/Datetime/Numeric vector. Range of sampling distribution of days. Can be Dates, Date-times, or DOY (day-of-year, 1-366).
Date/Datetime/Numeric. Mean date of the sampling distribution of days. Can be Date, Date-time, or DOY (day-of-year, 1-366).
Numeric. SD in days of the sampling distribution of days.
Numeric. Offset to shift for time of day in minutes.
Logical. Log the density in the selection function?
Character. Selection function to use. Options are
lognorm
, norm
(default), or cauchy
.
Character. Selection variable to plot
(if plot = TRUE
). Options are are psel
, psel_doy
, psel_min
,
psel_std
, psel_scaled
, or psel_normalized
(default).
Logical. Return parameter list for use in calc_selection_weights()?
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.
params <- sim_selection_weights()
Run the code above in your browser using DataLab