Presentation is loading. Please wait.

Presentation is loading. Please wait.

LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS PHILIPPE LIÉGEOIS (CEPS/INSTEAD, Luxembourg.

Similar presentations


Presentation on theme: "LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS PHILIPPE LIÉGEOIS (CEPS/INSTEAD, Luxembourg."— Presentation transcript:

1 LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS PHILIPPE LIÉGEOIS (CEPS/INSTEAD, Luxembourg and DULBEA, ULB, Brussels) GAËTAN DE MENTEN (FEDERAL PLANNING BUREAU, BRUSSELS) GIJS DEKKERS (FEDERAL PLANNING BUREAU, BRUSSELS, CENTRE FOR SOCIOLOGICAL RESEARCH, K.U.LEUVEN AND CEPS/INSTEAD) RAPHAËL DESMET (FEDERAL PLANNING BUREAU) European Meeting of the IMA Dublin, 17-19 May 2012 IGSS Luxembourg

2 2 I NTRODUCTION  LIAM2 is a new tool for the development of (large scale) dynamic microsimulation models (prospective as well as retrospective) with dynamic cross-sectional ageing (but also static models as a by-product)  User-friendly and efficient (developed in Python with use of the Hierarchichal Data Format HDF5 for data storage, but this is fully transparent to the modeller)  The result of a collaboration between the Federal Planning Bureau in Brussels (development), the CEPS/INSTEAD and the General Inspectorate of Social Security in Luxembourg (testing and complementary funding) and Cathal O’Donoghue (LIAM and expertise) as well as other experts, under European funding (MiDaL Project 2009-2011, PROGRESS programme, Grant VS/2009/0569) LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

3 3 C ONTENTS OF THE P RESENTATION  LIAM2 : Objectives  Situating LIAM2 in the family of modelling packages  How to proceed with that Working environment (for those who know simply nothing about it) ?  Building and simulating a model in LIAM2 explained in 10 minutes  Conclusions LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

4 4 LIAM2 : O BJECTIVES LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg  A development framework for the modelling and simulation of large scale discrete-time dynamic microsimulation models with cross-sectional dynamic ageing and alignment  A user-friendly and efficient development framework :  A clear separation (like in LIAM) between “modellers” (responsible for the modelling) and “programmers” (in charge of the development of critical methodological issues, including state-of-the-art methods for data-handling and simulation optimization)  Implementation of language which is easy to use for the modellers  Stimulate collaboration between development teams through the use of a common development approach (EURODYM)  Be open source, so that developers worldwide may add to the toolbox and make accessible their own modules when relevant for the community

5 5 S ITUATING LIAM2  Developed based on the experience gained through LIAM in the development of the MIDAS model (Federal Planning Bureau),but more general, faster, allowing for much larger datasets, etc  Does not require any programming in C++ (and buying Visual Studio) like ModGen which essentially a C++ library allowing for microsimulation (+/- like JAMSIM) and mainly developed for continuous-time modelling (agent-based models for JAMSIM)  LIAM2 is offering its o wn (easy) syntax, is d eveloped in Python and makes use (for efficiency reasons) of HDF5 for data (but no consequence for the end user), is a generic package allowing for any kind of object (“entities”)  Compared to GENESIS… see the next presentation LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

6 6 LIAM2 : HOW TO PROCEED WITH THAT WORKING ENVIRONMENT ?  Download the LIAM2 bundle from http://liam2.plan.be/http://liam2.plan.be/  The bundle includes :  The executable  A text editor (Notepad++), pre-configured to work with LIAM2  Documentation  A demonstration model (20,200 persons, 14,700 households)  Building and Simulating a Model in LIAM2 implies (classical !) : (A) Knowing more about the “bricks” available (B) Preparing the input dataset (C) Defining/writing the model (D) Running, (E) Debugging and Storing the results LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

7 7 B UILDING AND S IMULATING A M ODEL IN LIAM2 : (A) T HE B RICKS  LIAM2 involving several kinds of « bricks », among which…  ENTITIES : objects (persons, households, firms, cell, …) with a unique identifier  FIELDS : attributes of an entity (e.g. person’s age)  LINKS : relation between entities (e.g. person’s children) ; can lead to subsequent use (e.g. spouse.mother.age)  GLOBALS : a parameter not related to a specific entity, may vary through time (e.g. CPI)  PROCESSES : assignments, which change the value of a variable (e.g. « age+1 ») using an expression, and actions which do not (e.g. remove dead person)  MACROS : piece of code, re-evaluated each time it is referenced (e.g. « WIDOW: civilstate == 5 ») LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

8 8 A M ODEL IN LIAM2 : (B) P REPARING THE I NPUT D ATASET  For the moment, only from CSV files, one file for « globals » and one file for each entity  Create a description file, then run it (e.g. bundled editor, F5) => HDF5  Input created « normal.h5 » NB : This creation must be done only once (then LIAM2 reads the HDF5 input as it has been set earlier) LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

9 9 A M ODEL IN LIAM2 : (C) D EFINING – T HE G ENERAL S TRUCTURE  A model is typically composed of 3 main blocks…  « globals »  « entities » : including their fields, links and definition of processes (order not meaningful) and macros available for that kind of entity  « simulation » : including the general setup of the model, e.g. input, output, starting period of simulation, number of periods of simulation, etc  Within the blocks, indentation is meaningful (cf. YAML-markup language) LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

10 10 A M ODEL IN LIAM2 : (C) D EFINING – A SIMPLE E XAMPLE LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

11 11 A M ODEL IN LIAM2 : (C) D EFINING – A DDITIONAL F EATURES  Links are of « many2one » or « one2many » types « mc: (type: one2many, target: person, field: mother_id ) » « pm: (type: many2one, target: person, field: mother_id) »  LIAM2 allows for mathematical functions (e.g. « round(expr[, n]) »), conditional expressions (« if(...) »), aggregate functions (« grpsum(earnings) »), temporal functions (« duration(inwork) »), link functions (« sumlink(mc, age<12) »), random functions (« randint(0,10) »), stochastic changes (« gender=choice([True,False], [0.51,0.49]) »), life-cycle functions (« new(person) »), matching functions (e.g. for marriage, matching individual from set 1 with individuals from set 2, following a particular order regarding set 1)  Alignment : « logit_regr(expr[, align=‘filename’)]) » LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

12 12 A M ODEL IN LIAM2 : (D) R UNNING AND (E) D EBUGGING & O UTPUTTING  Run the model (e.g. bundled Notepad++ editor => F6)  Debugging e.g. through interactive console in the bundled editor  while running (error messages or intermediate results)  or at the end =>  Breakpoints (« breakpoint([period]) ») can be introduced in the model, which automatically launch the interactive console LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

13 13 A M ODEL IN LIAM2 : (E) D EBUGGING & O UTPUTTING  Or debugging e.g. through the store and post-analysis of results in files  By default, in HDF5 format (which can be transformed in Stata, SAS, R, … formats)  But also to « csv » files : csv('PERIOD=', period, dump(h_id, id, age, marst, s_id, ps.id, agediff, agediff2, filter = (id<10)), suffix='AGEDIFF') LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg

14 14 C ONCLUSIONS  LIAM2, a new development tool for the development of (large scale) static and discrete-time dynamic microsimulation models  User-friendly and Open source (low entry cost)  Efficient, even if can still be improved, making profit of state-of-the-art methods for data-handling and simulation methods, in a transparent way regarding the end-user (modeller)  In Belgium (MIDAS), 300,000 individuals over 60 years, 3500 lines of code, 142 parameters, 132 variables, 18 alignment processes, 14 CSV output files => 2 hours and 16 minutes  Operational already, under use or prior test in Belgium (MIDAS), Luxembourg (MIDAS_LU, partial), Japan, UK, and…  Just try it ! (and feeback welcome  ) LIAM2 P HILIPPE L IÉGEOIS (CEPS/INSTEAD ET DULBEA) - E UROPEAN M EETING IMA - D UBLIN - 18 M AY 2012 IGSS Luxembourg


Download ppt "LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS PHILIPPE LIÉGEOIS (CEPS/INSTEAD, Luxembourg."

Similar presentations


Ads by Google