Production Rules Based Classification of Migration

Provides mechanisms for classifying border crossings using a rules-based methodology. The goal of performing this type of classification is to identify any potential long-term migrants. A long-term migration is defined as a border crossing involving a change in residence status. A border crossing counts as a long-term migration to/from a country if it entails a change from non-residence to residence / residence to non-residence. The rules-based classification that used to determine a long-term migration is defined by a threshold duration and a test duration, alternatively named window size. Under a 12/16 rule, for instance, the threshold duration is 12 months and the test duration (window size) is 16 months. With a 9/12 rule, the threshold duration is 9 months and the test duration (window size) is 12 months. For more information about the methodology applied, please visit Stats NZ (2020) <>.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.9 by Leshi Chen, a year ago,

Report a bug at

Browse source code at

Authors: Leshi Chen [aut, cre] , Pubudu Senanayake [aut] , Del Robinson [aut] , Statistics New Zealand [cph]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports Rcpp, lubridate, stringr, dplyr, methods, parallel, futile.logger

Suggests magrittr, tools, knitr, rmarkdown, testthat

Linking to Rcpp

See at CRAN