knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The spflow package allows to estimate spatial econometric interaction models. It is designed to exploit the relational structure of flow data, reducing the computational burden and memory requirements.
You can install the released version of spflow from CRAN with:
install.packages("spflow")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("LukeCe/spflow@non-cartesian-flows")
The package provides a new spflow_network_multi-class
that combines information on the origins, the destinations, and the origin-destination pairs.
Once this object is created, we can estimate an interaction model with the spflow()
function.
By default the model includes three autoregression parameters: rho_o, rho_d, rho_w.
These parameters are related to origin-, destination-, and origin-to-destination-dependence.
Through the formula interface we specify which variables are used as origin O_()
, destination D_()
, intra-regional I_()
and OD-pair P_()
characteristics.
For more detailed examples have a look at the package vignette.
library("spflow") data("multi_net_usa_ge") spflow(y9 ~ O_(X) + D_(X) + I_(X) + P_(DISTANCE), multi_net_usa_ge)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.