plot_fit: Plot the 1-D time-series of estimated location and...

Description Usage Arguments Value Examples

View source: R/plot_fit.R

Description

Takes a fitted fit_ssm object and plots the observed (data), estimated location and behavioural states (posterior means) as 1-D time-series. Each individual dataset is plotted separately.

Usage

1
plot_fit(fit)

Arguments

fit

an output object from fit_ssm

Value

Observed locations are plotted as filled circles and estimated locations as blue lines with the 95% credible interval as a ribbon. Uses ggplot2 plotting functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(ellie)
fit.s <- fit_ssm(ellie, model = "DCRWS", tstep = 1, adapt = 2000, samples = 1000, 
              thin = 2, span = 0.1)
plot_fit(fit.s)

hfit.s <- fit_ssm(ellie, model = "hDCRWS", tstep = 1, adapt = 2000, samples = 1000, 
                thin = 2, span = 0.1)
plot_fit(hfit.s)

## End(Not run)

ianjonsen/bsam documentation built on May 8, 2018, 3:34 p.m.