Function transforming data frame to a list - input to Stan
data_2_standata.Rd
Function transforming data frame to a list - input to Stan
Arguments
- df
A data frame with migration data for sending countries, receiving countries, data quality measures and covariates
- sending
A vector of ISO2 codes with sending countries to be used in the model (recommended to keep SE and FI)
- receiving
A vector of ISO2 codes with receiving countries to be used in the model (recommended to keep SE and FI)
- years
A vector of years to be used in the model (2010 to 2019)
- ref.country
A character with an ISO2 code receiving country which immigration data are is used as a reference. This assumes that the data reported by this country are not biased. This assumption ensures identification of model parameters. It is strongly recommended to use Sweden ("SE") as a reference.
- priors
A list containing hyperparameters for the beta distributions representing high and low undercounting (i.e. bias) of emigration and immigration (EL, EH, IL, IH). Default values are based on experts' assessment in Wiśniowski et al. (2013).
References
Wiśniowski A., Bijak J., Christiansen S., Forster J. J., Keilman N., Raymer J., & Smith P. W. (2013). Utilising expert opinion to improve the measurement of international migration in Europe. Journal of Official Statistics, 29(4), 583-607. https://doi.org/10.2478/jos-2013-0041