visualize fits from an mpm object
# S3 method for class 'mpm_df'
plot(
x,
y = NULL,
se = FALSE,
pages = 0,
ncol = 1,
ask = TRUE,
pal = "Plasma",
rev = FALSE,
...
)a aniMotum mpm fit object with class mpm_df
optional ssm fit object with class ssm_df corresponding to x.
If absent, 1-d plots of gamma_t time series are rendered
otherwise, 2-d track plots with locations coloured by `gamma_tâ are rendered.
logical (default = FALSE); should points be scaled by gamma_t
uncertainty (ignored if y is not supplied)
plots of all individuals on a single page (pages = 1; default) or each individual on a separate page (pages = 0)
number of columns to use for faceting. Default is ncol = 1 but this may be increased for multi-individual objects. Ignored if pages = 0
logical; if TRUE (default) user is asked for input before each plot is rendered. set to FALSE to return ggplot objects
grDevices::hcl.colors palette to use (default: "Plasma"; see grDevices::hcl.pals for options)
reverse colour palette (logical)
additional arguments to be ignored
a ggplot object with either: 1-d time series of gamma_t estimates
(if y not provided), with estimation uncertainty ribbons (95 % CI's);
or 2-d track plots (if y provided) coloured by gamma_t, with smaller points
having greater uncertainty (size is proportional to SE^-2, if se = TRUE).
Plots can be rendered all on a single page (pages = 1) or on separate pages.
# generate a ssm fit object (call is for speed only)
xs <- fit_ssm(sese2, spdf=FALSE, model = "rw", time.step=72, control = ssm_control(verbose = 0))
#>
#>
# fit mpm to ssm fits
xm <- fit_mpm(xs, model = "jmpm")
#> fitting jmpm...
#>
pars: 0 0 0
pars: -0.63018 -0.77433 0.05731
pars: -0.21925 -0.90513 0.95955
pars: -0.08786 -0.20745 0.25528
pars: -0.18067 -0.7003 0.75278
pars: -0.42894 -0.54449 0.73596
pars: -0.45937 -0.82886 0.66962
pars: -0.39279 -0.70181 0.63844
pars: -0.2662 -0.72981 0.37502
pars: -0.36963 -0.70693 0.59025
pars: -0.38254 -0.70407 0.61711
pars: -0.40271 -0.6999 0.60524
pars: -0.41907 -0.69089 0.56152
pars: -0.41907 -0.69089 0.56152
# plot 1-D mp timeseries on 1 page
plot(xm, pages = 1)