Federal Planning Bureau Economic analyses and forecasts LIAM2* A sneak preview... *Life-cycle Income Analysis Model Gijs Dekkers Federal Planning Bureau.

Slides:



Advertisements
Similar presentations
LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS GAËTAN DE MENTEN (Federal Planning Bureau)
Advertisements

CC SQL Utilities.
Federal Planning Bureau Economic analyses and forecasts Federal Planning Bureau Economic analyses and forecasts The gross-net trajectory in MIDAS_BE Some.
Federal Planning Bureau Economic analyses and forecasts Federal Planning Bureau Economic analyses and forecasts On weights in dynamic- ageing microsimulation.
1 Projection Indexes in HDF5 Rishi Rakesh Sinha The HDF Group.
Working with pig Cloud computing lecture. Purpose  Get familiar with the pig environment  Advanced features  Walk though some examples.
Federal Planning Bureau Economic analyses and forecasts LIAM 2 A tool for the development of dynamic cross- sectional microsimulation models presentation.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Federal Planning Bureau Economic analyses and forecasts What are the consequences of the AWG projections on the adequacy of social security.
Service Point 5 ReportWriter How to create and run reports in ReportWriter.
MDU Development Unit Model. MDU Development Unit Model Howard Redway Model Development Unit UK Department for Work and Pensions
Getting Started with Haskell Tim Sheard. Learning a new language Goals – Learn how to design and use data structures – Learn to write programs using the.
Federal Planning Bureau Economic analyses and forecasts Federal Planning Bureau Economic analyses and forecasts The option value approach in MIDAS_BE Some.
 2002 Prentice Hall. All rights reserved. 1 Intro: Java/Python Differences JavaPython Compiled: javac MyClass.java java MyClass Interpreted: python MyProgram.py.
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
1 Data types, operations, and expressions Overview l Format of a Java Application l Primitive Data Types l Variable Declaration l Arithmetic Operations.
What are the driving forces behind trends in inequality among pensioners? ( Lessons from a stylized model ) Paper presented at the Séminaire Scientifique.
Principles of Procedural Programming
Before class begins… Help us to assess this session and plan for future workshops Please complete the Advanced Refworks Pre-learning assessment at:
Overview of Search Engines
MS Access Advanced Instructor: Vicki Weidler Assistant:
Estimating Hampshire’s Population at Output Area level Simon Brown Senior Research Officer Research and Communications.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS GIJS DEKKERS (FEDERAL PLANNING BUREAU, Brussels, CESO, K.U.LEUVEN.
Millennium 3 Your Service Bureau Name & Logo Here.
Introduction to Python
LIAM 2: A NEW OPEN SOURCE DEVELOPMENT TOOL FOR THE DEVELOPMENT OF DISCRETE-TIME DYNAMIC MICROSIMULATION MODELS PHILIPPE LIÉGEOIS (CEPS/INSTEAD, Luxembourg.
CASCOT for EurOccupations Demonstration of the software English, Dutch, French Manual coding Linking to EurOccupations database Automated coding Specific.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
Analyzing Data For Effective Decision Making Chapter 3.
Computer Science 111 Fundamentals of Programming I Basic Program Elements.
The WinMine Toolkit Max Chickering. Build Statistical Models From Data Dependency Networks Bayesian Networks Local Distributions –Trees Multinomial /
Input, Output, and Processing
Computer Science 101 Introduction to Programming.
Chapter 2: Using Data.
CONDITIONAL STATEMENTS OVERVIEW.  Many times we want programs to make decisions  What drink should we dispense from the vending machine?  Should we.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Import Testing Data Presented by: Adrian Ruiz Presented by: Adrian Ruiz.
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
I Power Higher Computing Software Development Development Languages and Environments.
SIMO Python/XML Simulator Current situation 28/10/2005 SIMO Seminar Antti Mäkinen Dept. of Forest Resource Management / University of Helsinki.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Chapter 7 C supports two fundamentally different kinds of numeric types: (a) integer types - whole numbers (1) signed (2) unsigned (b) floating types –
Intermediate 2 Computing Unit 2 - Software Development.
Autumn School Dynamic MSM16-18 November 2015 | L-Esch-sur-Alzette Slide 1 Aggregates, output and other basic tools.
Autumn School Dynamic MSM16-18 November 2015 | L-Esch-sur-Alzette Slide 1 7. Stochastic concepts in LIAM2.
 Software Development Life Cycle  Software Development Tools  High Level Programming:  Structures  Algorithms  Iteration  Pseudocode  Order of.
Autumn School Dynamic MSM16-18 November 2015 | L-Esch-sur-Alzette Slide 1 4. Basic concepts, a rudimentary model, and input data (demo01.yml)
Autumn School Dynamic MSM16-18 November 2015 | L-Esch-sur-Alzette Slide 1 Playing with Objects.
Anders Nielsen Technical University of Denmark, DTU-Aqua Mark Maunder Inter-American Tropical Tuna Commission An Introduction.
Autumn School Dynamic MSM16-18 November 2015 | L-Esch-sur-Alzette Slide 1 Advanced topics.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
AFTER THE QUIZ: ANALYSIS TOOLS, MODERATING & QUIZ LOGGING Professional Development February 4, 2016.
Getting Started With Python Brendan Routledge
Chapter # 2 Part 2 Programs And data
Fundamentals of Programming I Overview of Programming
Service Point 5 ReportWriter
Introduction to Python
Service Point 5 ReportWriter
Variables, Expressions, and IO
Functions CIS 40 – Introduction to Programming in Python
Java External Libraries & Case Study
Compiler design.
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Chapter 1: Programming Basics, Python History and Program Components
An introduction to MIDAS
13/05/2013 Gijs Dekkers Gaëtan de Menten Raphaël Desmet
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

Federal Planning Bureau Economic analyses and forecasts LIAM2* A sneak preview... *Life-cycle Income Analysis Model Gijs Dekkers Federal Planning Bureau and Katholieke Universiteit Leuven Sides made by Gaëtan de Menten Paper presented at the Paper to be presented at the « Tresury Brown Bag Lunch Meeting », Ministero dell'Economia e delle Finanze, Rome, February 14 th, 2011

Federal Planning Bureau Economic analyses and forecasts LIAM 2: the foundations  LIAM by Cathal O’Donoghue  Used in AIM-project, developing MIDAS for Belgium, Italy and Germany.  Updating, extending and considerable problem solving by Geert Bryon (FPB)  PROGRESS-MiDaL project (Grant VS/2009/0569)  FPP (Be): development, application and testing  Gaëtan de Menten: development  Geert Bryon: application and testing  Gijs Dekkers: management, data and a bit application  CEPS/INSTEAD (Lux): testing  IGSS (Lux): investment, testing  Cathal O’Donoghue (Teacasc, Ire), Howard Redway (minstry of work and pensions, uk): comments and conceptual assistance

Federal Planning Bureau Economic analyses and forecasts Overview of this sneak preview  Current features  Current performance  Demonstration  TODO(?)

Federal Planning Bureau Economic analyses and forecasts Current features  Input  Simulation: a text file  Alignment: CSV files  Initial field data: an hdf5 file  Output  hdf5 file  Converters  Old data format (Tab-separated text files) hdf5

Federal Planning Bureau Economic analyses and forecasts constants per_period: PARAMETER-NAME: float entities entity-name1 (e.g. Household): fields links processes entity-name2 (e.g. Person): fields links processes simulation: init: processes: entity: [list of processes, separated by commas] input: path: “path name” file: “file name.h5” output: path: “path name” file: “file name.h5” start_period: periods: The setup of a mode l

Federal Planning Bureau Economic analyses and forecasts Current features  Language  Python  High level, concise, readable, easy interface with C  Lots of 3 rd party libraries (especially scientific tools)  But uses some efficient (open source) libraries written mostly in C  Numpy  Numexpr  PyTables

Federal Planning Bureau Economic analyses and forecasts Current features  Can declare “fields” with a type  float, int, bool  Evaluate simple expressions  Arithmetic operators: +, -, *, /, **, %  0.51 * age * age ** 2 – * age ** 3  Comparison operators: =, >  age < 20  Boolean operators: and, or, not  not male and (age >= 15) and (age = 15) and (age <= 50)  Conditional expressions: if(condition, iftrue, iffalse)  if(age < 65, earnings, pension)

Federal Planning Bureau Economic analyses and forecasts Current features  Store fields  for each period (if the field is declared)  age: “age + 1”  as temporaries (the value is lost after each period)  ischild: “age < 18”  Macros (re-evaluated wherever they appears)  ISCHILD: “age < 18”  difference with temporaries:  ischild: "age < 18"  before1: “if(ischild, 1, 2)"  before2: “if(ISCHILD, 1, 2)“ # before1 == before2  age: "age + 1"  after1: "if(ischild, 1, 2)"  after2: "if(ISCHILD, 1, 2)“ # after1 != after2 !! # after1 == before 1

Federal Planning Bureau Economic analyses and forecasts Current features  Functions  Per individual  abs, log, exp  clip  0.25 * clip(age ** 3, 0, )  round  round(age / 10.0, 2)  min/max  min(age, 99)  max(pension, benefit)

Federal Planning Bureau Economic analyses and forecasts Current features  Functions  Aggregate functions  grpcount, grpsum, grpavg, grpstd, grpmax, grpmin  abs(age - grpavg(age))  Normal: random numbers with a normal distribution  normal(loc=0.0, scale=grpstd(errsal))  Some functions accept a filter argument  abs(age - grpavg(age, filter=male), filter=not male) filter=not male)

Federal Planning Bureau Economic analyses and forecasts Current features  lag/value_for_period  Only simple expressions and explicitly saved aggregates for now  value_for_period(inwork and not male, 2002)  lag(sum_twr)  matching: match two sets of individuals (aka Marriage market)  matches individuals from set 1 with individuals from set 2  follow a particular order (given by an expression)  for each individual in set 1, computes the score of all (unmatched) individuals in set 2 and take the best scoring one  matching(set1filter=to_marry and not male, set2filter=to_marry and male, set2filter=to_marry and male, orderby=difficult_match) orderby=difficult_match)

Federal Planning Bureau Economic analyses and forecasts Current features  Many-to-one links  partner.age  grpavg(partner.age – age)  partner.father.age  partner.get(earnings + benefits)

Federal Planning Bureau Economic analyses and forecasts Current features  One-to-many links  countlink(link, filter)  countlink(persons)  countlink(children, age < 18)  sumlink(link, expr, filter)  sumlink(persons, earnings, age >= 18)  avglink(link, expr, filter)  avglink(children, age, not male)  minlink/maxlink(link, expr, filter)  minlink(children, age, not male)

Federal Planning Bureau Economic analyses and forecasts Current features  Regressions  Logit  logit_regr(expr, filter, align)  Continuous (expr + normal(0, 1) * mult + error)  cont_regr(expr, filter, align, mult, error_var)  Clipped continuous (always positive)  clip_regr(expr, filter, align, mult, error_var)  Log continuous (exponential of continuous)  log_regr(expr, filter, align, mult, error_var)  Alignment  Fixed percentage or 2 dimensional table in a csv file

Federal Planning Bureau Economic analyses and forecasts Current features  Lifecycle functions  new: create new individuals  new('person', filter=to_give_birth)  remove: remove individuals from the dataset  remove(dead)  remove(nb_persons == 0)  Miscellaneous functions  show: print anything to the console  show(grpcount(age >= 18))  show(grpcount(not dead), grpavg(age, filter=not dead))

Federal Planning Bureau Economic analyses and forecasts Current features (9/10)  Miscellaneous functions  dump: produce a table with the expressions given as argument  show(dump(age, age / 10, filter=id < 20))  groupby (aka “pivot table”): group individuals by their value for the given expressions, and optionally compute an expression for each group  show(groupby((age / 10, gender)))  show(groupby((agegroup, gender, inwork), grpcount()))  show(groupby(agegroup, grpavg(income)))  show(groupby((inwork, gender), id, filter=age < 10)  csv: write a table to a csv file  csv(dump(age, age / 10, gender), suffix=‘age’)  Show: interactive assessment of results: command line

Federal Planning Bureau Economic analyses and forecasts Current Performance  For a simple model:  birth (using alignment data from MIDAS)  chronic ill (using a fixed percentage alignment)  marriage market  earnings (using macro alignment)  Or at least what I think macro alignment is...  death (using alignment data from MIDAS)

Federal Planning Bureau Economic analyses and forecasts Current Performance  10,000 persons, 20 periods  2,65s (on a Dell latitude laptop computer)  100,000 persons, 20 periods  29s  1,000,000 persons, 20 periods  16 minutes 31s, of which approx. 83% is spent in the marriage market  ~180Mb RAM  897Mb output file  could be compressed if needed  For a complete model with 100,000 persons  probably under 10min

Federal Planning Bureau Economic analyses and forecasts Demonstration

Federal Planning Bureau Economic analyses and forecasts TODO  Automated tests (aka “unit tests”)  Documentation  User manual  Code  Speed optimizations  Clean-up the code

Federal Planning Bureau Economic analyses and forecasts Questions or comments?