check: Check goodness of fit for 'mobility.model' class

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/check.R

Description

This function takes a fitted mobility mobility.model object and calculates goodness of fit metrics. If the Deviance Information Criterin (DIC) was calculated in the supplied model object, it is included in output. When plots = TRUE, two plots are shown containing the posterior distribution of trip counts compared to observed data and a Normal Q-Q plot showing the quantiles of model residuals against those expected from a Normal distribution.

Usage

1
check(object, plots, ...)

Arguments

object

a mobility.model object produced by the mobility function

plots

logical indicating whether to plot the Posterior Predictive Check and Normal Q-Q Plot (default = TRUE)

...

further arguments passed to or from other methods

Details

Goodness of fit metrics include:

DIC

Deviance Information Criterion

RMSE

Root Mean Squared Error

MAPE

Mean Absolute Percent Error

R2

R-squared

Value

a list of goodness of fit measures

Author(s)

John Giles

See Also

Other model: compare(), fit_jags(), fit_prob_travel(), mobility(), predict(), residuals(), summary()

Examples

1
2
mod <- mobility(data=mobility_matrices, model='gravity', type='transport', DIC=TRUE)
check(mod)

COVID-19-Mobility-Data-Network/mobility documentation built on Nov. 22, 2021, 12:17 a.m.