sfilter: State-space filter RAATD tracking data

Description Usage Arguments Details Value Examples

Description

sfilter() fits a simple state-space model to fit to pre-filtered RAATD data and returns output as a tibble grouped by individual id or individual id and breeding stage.

Usage

1
sfilter(d, ts = list(gps = 1, gls = 12, ptt = 2), ...)

Arguments

d

input data from prefilter() as a tibble of individual tracks grouped by id

ts

specify a list of time steps (in h) for gps, gls, & ptt datasets

...

additional arguments passed to ssmTMB::fit_ssm(). Two common arguments are span, the degree of loess smoothing used to estimate initial values for the location states, and nu, the degree of freedom to be used in the t-distributed error models for lon & lat

Details

Wrapper function that takes data prepared by prefilter(), assigns appropriate time steps for GPS, GLS and/or PTT devices & calls ssmTMB::fit_ssm() to do the filtering. ssmTMB can be installed via devtools::install_github("ianjonsen/ssmTMB"). Note, as sfilter() imports functions from the ssmTMB package, you must ensure you have installed the TMB package and it's dependencies

Value

a list with 10 elements (see ?ssmTMB::fit_ssm())

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
## run prefilter with example royal penguin data & metadata
data(rope)

pfd <- prefilter(
  dat = rope,
  metadata = meta,
  sp = "ROPE",
  min_obs = 30,
  min_days = 5,
  vmax = 10
  )

ssm_by_id <- pfd %>%
  do(ssm = sfilter(., span = 0.4, nu = 5))

## re-filter tracks that failed to converge
ssm_by_id <- redo_sfilter(ssm_by_id, pfd, tries = 10)

## generate QC plots
ssm_by_id %>% qc_plot(sp = "rope")

## End(Not run)

ianjonsen/duckConfit documentation built on May 30, 2019, 4:36 p.m.