These functions load example outputs from key patter
functions. They are included in the package to streamline function examples and tests.
dat_path()
dat_coa()
dat_pff()
dat_pfb()
dat_tff()
For full details on the algorithm parameters used to generate these datasets, see https://github.com/edwardlavender/patter/blob/main/data-raw/003-add-data-algorithms.R.
The functions return a dataset or a character
string that defines the path to a dataset. See the corresponding function documentation for full details.
dat_path()
reads an example output from sim_path_walk()
;
dat_coa()
reads an example output from coa()
;
dat_pff()
reads an example output from a forward run of pf_filter()
;
dat_pfb()
reads an example output from a backward run of pf_filter()
;
dat_tff()
reads an example output from pf_smoother_two_filter()
;
Particle filters and smoothers sample states (particles) that represent the possible locations of an individual through time, accounting for all data and the individual's movement.
To simulate artificial datasets, see sim_*()
functions (especially sim_path_walk()
, sim_array()
and sim_observations()
).
To assemble real-world datasets for the filter, see assemble
_*()
functions.
pf_filter()
runs the filter:
To run particle smoothing, use pf_smoother_two_filter()
.
To map emergent patterns of space use, use a map_*()
function (such as map_pou()
, map_dens()
and map_hr()
).
# Load inbuilt datasets
dat_path() |> summary()
#> path_id timestep timestamp map_value
#> Min. :1 Min. : 1.00 Min. :2016-01-01 00:00:00 Min. : 13.81
#> 1st Qu.:1 1st Qu.: 90.75 1st Qu.:2016-01-01 02:59:30 1st Qu.: 70.94
#> Median :1 Median :180.50 Median :2016-01-01 05:59:00 Median :103.07
#> Mean :1 Mean :180.50 Mean :2016-01-01 05:59:00 Mean :105.72
#> 3rd Qu.:1 3rd Qu.:270.25 3rd Qu.:2016-01-01 08:58:30 3rd Qu.:138.64
#> Max. :1 Max. :360.00 Max. :2016-01-01 11:58:00 Max. :183.60
#> x y
#> Min. :708205 Min. :6265168
#> 1st Qu.:709215 1st Qu.:6268402
#> Median :710053 Median :6269311
#> Mean :709972 Mean :6268913
#> 3rd Qu.:710777 3rd Qu.:6270004
#> Max. :711345 Max. :6270754
dat_coa() |> summary()
#> timestep timestamp map_value x
#> Min. :1.00 Min. :2016-01-01 00:00:00 Min. : 74.88 Min. :708742
#> 1st Qu.:2.25 1st Qu.:2016-01-01 02:30:00 1st Qu.: 85.59 1st Qu.:709202
#> Median :3.50 Median :2016-01-01 05:00:00 Median : 98.15 Median :710019
#> Mean :3.50 Mean :2016-01-01 05:00:00 Mean :103.15 Mean :709772
#> 3rd Qu.:4.75 3rd Qu.:2016-01-01 07:30:00 3rd Qu.:111.01 3rd Qu.:710240
#> Max. :6.00 Max. :2016-01-01 10:00:00 Max. :151.03 Max. :710609
#> y
#> Min. :6266140
#> 1st Qu.:6268791
#> Median :6269140
#> Mean :6268864
#> 3rd Qu.:6269756
#> Max. :6270129
dat_pff() |> summary()
#> Length Class Mode
#> xinit 3 data.table list
#> states 6 data.table list
#> diagnostics 4 data.table list
#> convergence 1 -none- logical
dat_pfb() |> summary()
#> Length Class Mode
#> xinit 3 data.table list
#> states 6 data.table list
#> diagnostics 4 data.table list
#> convergence 1 -none- logical
dat_tff() |> summary()
#> Length Class Mode
#> xinit 0 -none- NULL
#> states 6 data.table list
#> diagnostics 4 data.table list
#> convergence 1 -none- logical