MEDUSA is an R package that allows the development of distributional analyses in isolation or in connection with other models (soft links). The extensive database in which the microsimulation model is based allows for highly disaggregated results, taking into account numerous socioeconomic and demographic characteristics of households, such as income level, place of residence, type of family or the feminization degree of the household.
❗❗ Note: At the moment, medusa
package works for Spain, but in the short term the idea is to extend it to all EU countries. Moreover, the package could be extended to all countries that are able to provide the raw data of the model.
MEDUSA allows to develop distributional analyses based in an overnight effect microsimulation model. The model is built up with the microdata from the Household Budget Survey. For more details on the model in which medusa
is based click here.
To use medusa
package first you need to follow this steps:
Install R and Rstudio (only if not already installed)
Load medusa
package. For this, open Rstudio and load the library:
install.packages('remotes')
remotes::install_github("bc3LC/medusa")
library(medusa)
Now the package is fully loaded and you can start using its functions.
The medusa
package contains 3 main blocks of functions:
calc_di
, ex_shocks
, available_var_impact
, available_var_intersec
and ex_var_intersec
.load_rawhbs
, rename_values
, standardize
, add_coicop
, elevate_hbs
, price_shock
, impact
, impact_intersectional
, basic_graph
, intersectional_graph
, order_var
, adjust_wh
and adjust_wh_is
.calc_ep
...
calc_tp
...
In addition, the package includes some default input files (.Rda), that are read by the different functions.