Running a whole simulation of a doubly constrained gravity model
Source:R/workflow_rcpp.R
simulation.Rd
this script takes flows data, distance matrix, and a reference beta parameter and finds the optimal beta value for the model, runs it, and returns the result and the beta of best fit.
currently only the exp value is accepted for the cost_fun parameter.
Arguments
- flows_matrix
a integer matrix of flows
- dist_matrix
a distance matrix containing numeric values in kilometers
- beta_offset
an offset from 0 from which to start looking for the best fit value.