Learn R Programming

amt (version 0.1.4)

update_sl_distr: Update movement distributions

Description

Update tentative step length or turning angle distribution from a fitted iSSF.

Usage

update_sl_distr(object, beta_sl = "sl_", beta_log_sl = "log_sl_", ...)

update_ta_distr(object, beta_cos_ta = "cos_ta_", ...)

Arguments

object

[fit_clogit] A fitted iSSF model.

beta_sl

[character] The name of the coefficient of the step length.

beta_log_sl

[character] The name of the coefficient of the log of the step length.

...

Further arguments, none implemented.

beta_cos_ta

[character] The name of the coefficient of cosine of the turning angle.

Value

An amt_distr object, which consists of a list with the name of the distribution and its parameters (saved in params).

References

Fieberg et al. in prep.

See Also

Wrapper to fit a distribution to data fit_distr()

Examples

Run this code
# NOT RUN {
# Fit an SSF, then update movement parameters.

 #Prepare data for SSF
ssf_data <- deer %>%
  steps_by_burst() %>%
  random_steps(n = 15) %>%
  extract_covariates(sh_forest) %>%
  mutate(forest = factor(sh.forest, levels = 1:2,
                    labels = c("forest", "non-forest")),
  cos_ta_ = cos(ta_),
  log_sl_ = log(sl_))

# Check tentative distributions
#    Step length
attr(ssf_data, "sl_")
#    Turning angle
attr(ssf_data, "ta_")

# Fit an iSSF
m1 <- ssf_data %>%
  fit_issf(case_ ~ forest +
               sl_ + log_sl_ + cos_ta_ +
               strata(step_id_))

# Update step length distribution
new_gamma <- update_sl_distr(m1)

#Update turning angle distribution
new_vm <- update_ta_distr(m1)

# }

Run the code above in your browser using DataLab