View source: R/calcMoversPriors.R
calcMoversPriors | R Documentation |
calcMoversPriors calculates prior estimates of in-state and cross-state movers rates from the IRS SOI Migration data, which can be used to improve the accuracy of the EM algorithm.
calcMoversPriors(geo.a, geo.b, year.start, year.end,
county, state.a, state.b, matchrate.lambda, remove.instate)
geo.a |
The state code (if state = TRUE) or county name (if state = FALSE) for the earlier of the two voter files. |
geo.b |
The state code (if state = TRUE) or county name (if state = FALSE) for the later of the two voter files. |
year.start |
The year of the voter file for geography A. |
year.end |
The year of the voter file for geography B. |
county |
Whether prior is being calculated on the county or state level. Default is FALSE (for a state-level calculation). |
state.a |
If |
state.b |
If |
matchrate.lambda |
If TRUE, then returns the match rate for lambda (the expected share of observations in dataset A that can be found in dataset B). If FALSE, then returns the expected share of matches across all pairwise comparisons of datasets A and B. Default is FALSE |
remove.instate |
If TRUE, then for calculating cross-state movers rates assumes that successful matches have been subsetted out. The interpretation of the prior is then the match rate conditional on being an out-of-state or county mover. Default is TRUE. |
calcMoversPriors
returns a list with estimates of the expected
match rate, and of the expected in-state movers rate when matching within-state.
Ben Fifield <benfifield@gmail.com>
calcMoversPriors(geo.a = "CA", geo.b = "CA", year.start = 2014, year.end = 2015)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.