rakeR is an R package designed to make spatial microsimulation as easy as possible.

It gets its name from the process of ‘raking’ the constraints to simulate the target variable.

rakeR is built on code developed by Robin Lovelace and Morgane Dumont in their book Spatial Microsimulation with R

rakeR takes this code and automates all of the manual data manipulation required to complete the spatial microsimulation, with the following advantages:

  • The user does not need to remember the process involved in simulating the final data set.
  • The human time required to create a spatial microsimulation model is greatly reduced.
  • The opportunity for human error to creep in to the process is minimised.

rakeR accepts two data frames, one for the constraints and one for the survey, and returns the spatial microsimulation results in the desired format (weights, extracted weights, integerised cases, or a simulated data set).

You are welcome to contribute issues, pull requests, or comments.