1 / 44

Comparison of LIAM2 and Genesis Model Generators

Comparison of LIAM2 and Genesis Model Generators. Howard Redway Model Development Unit UK Department for Work and Pensions Howard.Redway@dwp.gsi.gov.uk IMA Conference May 18 2012. Background: Why Were Genesis and LIAM2 Developed How Are They Used

patch
Download Presentation

Comparison of LIAM2 and Genesis Model Generators

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Comparison of LIAM2 and Genesis Model Generators Howard Redway Model Development Unit UK Department for Work and Pensions Howard.Redway@dwp.gsi.gov.uk IMA ConferenceMay 18 2012

  2. Background: Why Were Genesis and LIAM2 Developed How Are They Used Overview of the Structure of Genesis and LIAM2 Main Differences in Functionality Structure of a Genesis Model Structure of a LIAM2 Model Simple Example of Genesis and LIAM2 Code More Complex Example of Genesis and LIAM2 Code Conclusions Questions Further Information Presentation Overview

  3. Originally Developed for Pensim2 (replacing for Pensim) To model State and Private Pensions policies Desktop tool Parameter driven by users Maintainable within DWP (Not black box like Pensim) Based on DWP standard language – SAS Why Genesis was Developedand How is it Used (1)

  4. Originally Developed for Pensim2 (replacing for Pensim) To model State and Private Pensions policies Desktop tool Parameter driven by users Maintainable within DWP (not black box like Pensim) Based on DWP standard language – SAS Realised it could generate a wide class of models Became Genesis separate from Pensim2 5 other Genesis models in addition to Pensim2 Genesis is owned and maintained by DWP Why Genesis was Developedand How is it Used (1)

  5. Pensim2: First release 2004 Used by the Pensions Commission Private and State Pension Policy Development Forecasting Up to 20 users at any one time High turnover of users and developers About 6 released a year (2 major) Why Genesis was Developedand How is it Used (2)

  6. LIAM2 was developed: For the development and management of large dynamic microsimulation models by teams of researchers To be flexible so that modellers can update the models fast to changes in the circumstances To separate the computer programming from the model development Microsimulation teams no longer have to reinvent the wheel Different teams can cooperate more easily Why LIAM2 Developed and How is it Used

  7. LIAM2 was developed: For the development and management of large dynamic microsimulation models by teams of researchers To be flexible so that modellers can update the models fast to changes in the circumstances To separate the computer programming from the model development Microsimulation teams no longer have to reinvent the wheel Different teams can cooperate more easily As an open source tool running on a standard PC Why LIAM2 Developed and How is it Used

  8. LIAM2 was developed: For the development and management of large dynamic microsimulation models by teams of researchers To be flexible so that modellers can update the models fast to changes in the circumstances To separate the computer programming from the model development Microsimulation teams no longer have to reinvent the wheel Different teams can cooperate more easily As an open source tool running on a standard PC Several models produced or under development Why LIAM2 Developed and How is it Used

  9. LIAM2 was developed: For the development and management of large dynamic microsimulation models by teams of researchers To be flexible so that modellers can update the models fast to changes in the circumstances To separate the computer programming from the model development Microsimulation teams no longer have to reinvent the wheel Different teams can cooperate more easily As an open source tool running on a standard PC Several models produced or under development LIAM2 is being developed at the Federal Planning Bureau (Belgium), with funding and testing by CEPS/INSTEAD (Luxembourg) and IGSS (Luxembourg), and EU funding Why LIAM2 Developed and How is it Used

  10. LIAM2 is: An interpreter/compiler Written in Python (model developer and users do not need to know this) The model is specified in text as a LIAM2 program In YAML-markup language (independent of Python) Most LIAM2 statements are interpreted and executed (some are compiled) Structure of a Model: LIAM2 (1)

  11. Structure of a Model: LIAM2 (2) LIAM2

  12. Structure of a Model: LIAM2 (2) Model Specification (YAML format) LIAM2

  13. Structure of a Model: LIAM2 (2) Model Specification (YAML format) Alignment Matrices LIAM2

  14. Structure of a Model: LIAM2 (2) Model Specification (YAML format) Alignment Matrices Base Data LIAM2

  15. Structure of a Model: LIAM2 (2) Model Specification (YAML format) Alignment Matrices Base Data LIAM2 Output Log and PC Output

  16. Genesis is: A code generator Written in SAS Model specified as parameters in Excel sheets Writes and then runs a SAS program Structure of a Model: Genesis (1)

  17. Structure of a Model: Genesis (1) Genesis Model Engine

  18. Structure of a Model: Genesis (1) Parameters Excel Spreadsheets Genesis Model Engine

  19. Structure of a Model: Genesis (1) Static Code Developers Own SAS Parameters Excel Spreadsheets Genesis Model Engine

  20. Structure of a Model: Genesis (1) Static Code Developers Own SAS Parameters Excel Spreadsheets Genesis Model Engine SAS Program

  21. Structure of a Model: Genesis (1) Static Code Developers Own SAS Parameters Excel Spreadsheets Genesis Model Engine Base Data SAS Program

  22. Structure of a Model: Genesis (1) Static Code Developers Own SAS Parameters Excel Spreadsheets Genesis Model Engine Base Data SAS Program Output Log

  23. Structure of a Model: Genesis (1) Tools Static Code Developers Own SAS Parameters Excel Spreadsheets Genesis Model Engine Base Data SAS Program Tools Output Log Tools

  24. Genesis has: Static Code: Provides the flexibility to code in SAS processes that are not supported by the specific Genesis functionality Missing values: SAS missing value indicator enable missing values to be trapped (LIAM2 uses -1 and FALSE for Integer and Boolean missing values). Date processing Unordered Polychotomous Regressions Main Differences in Functionality (1)

  25. Genesis has: Static Code: Provides the flexibility to code in SAS processes that are not supported by the specific Genesis functionality Missing values: SAS missing value indicator enable missing values to be trapped (LIAM2 uses -1 and FALSE for Integer and Boolean missing values). Date processing Unordered Polychotomous Regressions Ordered Polychotomous Regressions Probit Regression (specific functionality) Main Differences in Functionality (1)

  26. LIAM2 has: Interactive Console and Breakpoints: Powerful debugging tool (inspection of variables and step through procedures) Temporary Variables: Not saved automatically and may be local to a procedure Main Differences in Functionality (2)

  27. LIAM2 has: Interactive Console and Breakpoints: Powerful debugging tool (inspection of variables and step through procedures) Temporary Variables: Not saved automatically and may be local to a procedure Macros (more general than Genesis Selection Criteria) One2Many links and link functions Forced outcomes with alignment (take/leave) Partnership matching Cloning: create a new record copying selected variables Output functions (can be switched off) Main Differences in Functionality (2)

  28. How would you assign level of education in LIAM2 for persons aged 25 and over? Assuming the variables Age and EducationLevel had be defined Specify the following as a process for the entity person. Example 1: Simple LIAM2 Choice Process

  29. How would you assign level of education in LIAM2 for persons aged 25 and over? Assuming the variables Age and EducationLevel had be defined Specify the following as a process for the entity person. EducationLevel: if( (Age>25) and (EducationLevel != -1), choice([2,3,4], [0.25, 0.39, 0.36]) , EducationLevel ) Example 1: Simple LIAM2 Choice Process

  30. How would you assign level of education in LIAM2 for persons aged 25 and over? Assuming the variables Age and EducationLevel had be defined Specify the following as a process for the entity person. EducationLevel: if( (Age>25) and (EducationLevel != -1), choice([2,3,4], [0.25, 0.39, 0.36]) , EducationLevel ) The within the simulation block of the program: person: [EducationLevel] Example 1: Simple LIAM2 Choice Process

  31. Example 1: Simple Genesis DPM Action SelectionCriteriaRule Sheet

  32. Example 1: Simple Genesis DPM Action SelectionCriteriaRule Sheet DPM_Assign_Education Sheet

  33. Example 1: Simple Genesis DPM Action SelectionCriteriaRule Sheet DPM_Assign_Education Sheet ActionRule Sheet

  34. Example 2: More Complex Genesis DPM Action DPM_Assign_Education Sheet

  35. EducationLevel: if( (age>25) and (EducationLevel != -1) and (Man_UK_Born) , if((period=2002), choice([2,3,4], [0.25,0.39,0.36]) , if((period=2003), choice([2,3,4], [0.24,0.39,0.37]) , if((period=2004), choice([2,3,4], [0.23,0.38,0.39]) , if((period=2005), choice([2,3,4], [0.23,0.37,0.4]) , EducationLevel ) ) ) ) , Example 2: More Complex LIAM2 Choice Process

  36. EducationLevel: if( (age>25) and (EducationLevel != -1) and (Man_UK_Born) , if((period=2002), choice([2,3,4], [0.25,0.39,0.36]) , f((period=2003), choice([2,3,4], [0.24,0.39,0.37]) , if((period=2004), choice([2,3,4], [0.23,0.38,0.39]) , if((period=2005), choice([2,3,4], [0.23,0.37,0.4]) , EducationLevel ) ) ) ) , if( (age>25) and (EducationLevel != -1) and (Man_NonUK_Born) etc ) Example 2: More Complex LIAM2 Choice Process

  37. LIAM2 and Genesis are both able to generate discrete dynamic microsimulation models containing similar processes (demographic, labour market, pension processes) Genesis requires SAS (currently version 9.1) Genesis is owned and maintained by DWP LIAM2 is Open Source Conclusions (1)

  38. LIAM2 and Genesis are both able to generate discrete dynamic microsimulation models containing similar processes (demographic, labour market, pension processes) Genesis requires SAS (currently version 9.1) Genesis is owned and maintained by DWP LIAM2 is Open Source There are a few major differences in functionality Genesis has Static Code LIAM2 has Interactive Console and Temporary variables Conclusions (1)

  39. LIAM2 and Genesis are both able to generate discrete dynamic microsimulation models containing similar processes (demographic, labour market, pension processes) Genesis requires SAS (currently version 9.1) Genesis is owned and maintained by DWP LIAM2 is Open Source There are a few major differences in functionality Genesis has Static Code LIAM2 has Interactive Console and Temporary variables Many other differences in functionality Conclusions (1)

  40. LIAM2 and Genesis are both able to generate discrete dynamic microsimulation models containing similar processes (demographic, labour market, pension processes) Genesis requires SAS (currently version 9.1) Genesis is owned and maintained by DWP LIAM2 is Open Source There are a few major differences in functionality Genesis has Static Code LIAM2 has Interactive Console and Temporary variables Many other differences in functionality Different approach to how a model is specified Conclusions (1)

  41. The slow running of Genesis is a concern Currently looking for ways to speed this up LIAM2 appears to be significantly faster No direct comparison available yet Conclusions (2)

  42. The slow running of Genesis is a concern Currently looking for ways to speed this up LIAM2 appears to be significantly faster No direct comparison available yet If both Genesis and LIAM2 are capable of generating a specific model with acceptable runtimes then the most appropriate interface for the intended users is likely to be a significant factor Conclusions (2)

  43. Questions? Genesis Information: Howard.Redway@dwp.gsi.gov.uk Or any member of the Model Development Unit Two presentations in the next session LIAM2 information: http://liam2.plan.be/ Questions Further Information

More Related