Benedetta Bianchi Cristina Platon

Simulation models for economics

Project work on

"Wage Pension Migration 1."

 

The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.


powered by NetLogo

view/download model file: wage_pension_migration1.nlogo

WHAT IS IT?

This work aims at understanding and explaining the behaviour of workers who face the choice of the best country where they would like to live, according to their preferences about the trade off between wage now and pension tomorrow, their years left before retirement, the income they happen to have and the tax regimes of countries.


HOW IT WORKS

The model contains two countries and two different kinds of agent.
Countries are distinguished by different income (in total and in distribution) and tax levels, reflecting the real world, where states have different sizes of the economy, more or less equally distributed earnings, and adopt different fiscal policy choices.
Agents are citizens with distinct characteristics: some are forward looking, and give more importance to their future pension than to their actual wage, whereas some are unforeseeing and care only about their wage today. In the economic theory individuals make their retirement decisions and job choices on the basis of discounted present values of income flows expected for the options. The differences in the perception of time between individuals is captured by their personal discout rate: present oriented persons have higher discount rates than forward looking ones, hence lower present values of income flows in the future. In this work, as we wanted to focus our attention on the outcomes resulting from preference and income distributions, rather than the mathematic representation of those preferences, we have not included present values. Agents simply have inclination toward either wage today or pension tomorrow.
Consequently, every person has a "favourite country", where they decide to move if it is not their State of origin.
An interaction between agents is performed as follows: workers who want to move have an influencing effect on those who want to stay, and have the power of convincing them to leave. The converse is not true, as we thought it is more realistic if the choice of remaining is given by other factors than imitation, as affection to your birth country or patriottic issues. It is more likely in our view that adventurous people can persuade others while steady people cannot convince adventurous.
Several variables are controlled by the observer, leading to various states of the world, and consequently to different rules for agent's acting, the most important of which are the tax level and the average (or distribution of) wage within each State.


HOW TO USE IT

Countries:
The two countries are called country1 and country2 and each of them possesses the following features: average wage and personal tax. There are two sliders for each country. The age of retirement is the same, 65, everywhere.

Rules
number-people: it fixes the number of agents on which the experiment is set up;
percentage-higher: it indicates the proportion by which a wage or a pension in a country has to exceed the wage or pension of the other country to induce agents to move out.

Agents
The agents have the following variables:
yearsOld: age;
preference: 0 if the person prefers high wage [white], 1 if she prefers high pension [black]
decision: 0 if the agent decides not to move [blue], 1 if she decides to move [red]
total: sum of the decisions of the neighbours
yearsb4retirement: 0 if the person is less than 65, 65 – yearsOld if she is more than 65


THINGS TO NOTICE

The two variables “preference” and “decision” differ for the fact that the first one is a quality of the agents, which does not change with ticks – years, while the second depends, other than on preferencies, also on other variables such as total and yearsb4retirement, so it can change from a tick to another.
White color is assigned to people with high wage preference, black to high pension preference ones. This suddivision of colours, though, is visible only at the first tick, as after that agents make their decision and change color: red if they want to move, blue if they do not.
YearsOld and preference are assigned in a random way, the first ranging from 0 to 99; the second from 0 to 1.
This is a simplified version where everybody gets the same salary. Look at model 2 for more complicated distributions of income.


THINGS TO TRY

EXPERIMENT 1:
number-people: any number
percentage-higher = 0.2
averagewage1 = averagewage2 = 5000
tax1 = 1500
tax2 = range [1300 – 1800]
outcome: nobody wants to move – remember that every agent here has the same wage and tax, equal to the average. Everybody is happy because the differences in wages and pensions of the 2 countries are not wide enough to inducing them to move out.
EXPERIMENT 2:
number-people: any number
percentage-higher = 0.2
averagewage1 = 5000
averagewage2 = 4000
tax1 = 3000
tax2 = 1000
outcome: in the first tick, roughly half population decides to move out; in the second, only few individuals want to change country; at the third tick everybody is happy and blue. The reason why in tick 2 there are people who want to move is that in the first one they had been influenced by other agents in choosing a country which is suboptimal for them, thus they want to move out again. The final result is a higher number of people in country 2


EXTENDING THE MODEL

This model could be extended using the the life-cycle model for retirement decision, in order to describe agents' preferences. That is, calculations of present values of income flows could be put in, and, giving different discount rates to each individual, it would be possible to differenciate their preferences. Rather than having only 2 categories - present oriented and forward looking people, it would be possible to have a more complex distribution of preferences.


NETLOGO FEATURES

The two main procedures are "setup" and "go".

In "setup", the first thing we do is clearing the space from the previous execution of the model. Then, we use two different procedures to set up turtles and patches, so the model is clearer for anyone interested.

In "setup-patches", we divide the view in two parts (or countries) by naming country1 the patches with the x coordinate greater than zero (the patches on the right of the screen) and country2 the other ones (the patches on the left of the screen).

In "setup-turtles", we create turtles (persons, for the purposes of this model) and set up their variables. We randomly choose an age for the people (with set yearsOld random 100). Then, we use an "ifelse" condition to find out the number of years of work each person has before retirement. We set the variable yearsb4retirement to 0 if the person is already older than an average retirement age of 65 and to 65 – yearsOld if the person is still at an employment age. We randomly set a preference for each person, either 0 or 1. At last, we place the people at a random location in the View box.

The "go" function contains 4 procedures ("decide-by-yourOwn", "change-decisions", "move" and "do-plots"), a tick counter and an instruction for the go procedure to stop when the counter reaches 100, to imitate a human’s lifespan.

In "decide-by-yourOwn", we first assume that the people don’t want to move, then we revise that assumption. So, for the people that prefer higher wage (preference is 0), we check if the net average wage of the foreign country is higher than the net average wage of their own country, at least by percentage-higher (a slider set in the Interface). The net average wage is calculated as the average wage minus tax for each country.

For the people that prefer a higher pension, we check if the tax in the foreign country is higher than that in their country, always by percentage-higher. If that is the case and the person has more than 15 years of work before he/she can retire (yearsb4retirement > 15), than he/she decides to move. So, if the conditions of the other country are more advantageous, according to the preference of the turtle, then the person decides to move (sets decision to 1) and turns red. Conversely, he/she turns blue if he/she is already in the favourite country.

In the "change-decisions" procedure every person looks at their neighbors in a radius of 5 around their patch, checks how many neighbors want to move and initializes the variable total with that number. Then, if more than a half of the neighbors has taken the decision to move, the turtle imitates the neighbors and sets its decision to 1 as well.

The next procedure in go is the one titled "move". As the name suggests, this is where all turtles that in the previous procedure decided to leave their country do so. Therefore, if the decision variable of a person is equal to 1 and if the person is in country 1, then he/she moves to one of the patches that comprise country 2. Similarly, if a red person is on a patch from country 2, then he/she moves to country 1.

In each realization of this procedure (everytime the go button is pressed), all the people age – the variable yearsOld is incremented by one unit.


PROCEDURES

globals [
  country1  ;; high pension country
  country2  ;; low pension country
]




turtles-own  [
  yearsold
  preference ;; 0 if the person prefers high wage, 1 if he prefers high pension. tax is both tax and future pension
  decision   ;; 0 if the person decides not to move, 1 if he decides to move
  total
  yearsb4retirement ;; 0 if person is older than 65, 65-age if person is younger than 65
]


to setup
  clear-all
  setup-patches
  setup-turtles
end
  
to setup-patches
  ;; create the countries
  set country1 patches with [pxcor > 0]
  ask country1 [ set pcolor yellow ]
  set country2 patches with [pxcor <= 0]
  ask country2 [ set pcolor green ]
end

to setup-turtles
  ;; create characteristics for the agents
  set-default-shape turtles "person"
  crt number-people
  ask turtles 
    [ set yearsOld random 100
      ifelse (yearsOld > 65) 
       [set yearsb4retirement 0]
       [set yearsb4retirement 65 - yearsOld]   
      
      set preference random 2   
      setxy random-xcor random-ycor
      ifelse preference = 0
       [set color white]
       [set color black]
    ]
end

to go
  decide-by-yourOwn
  change-decisions
  move
  do-plots
  tick
  if ticks = 100 [stop]
end

to decide-by-yourOwn   
    
  ask turtles   [set decision 0 set color blue]
  
  ask turtles [
  ;; if he wants high wage and he is from country1, but country2 wage is a certain percent higher, he decides to move-decision 1
  ;; if he wants high wage and he is from country2, but country1 wage is a certain percent higher, he decides to move-decision 1 
  if  ((preference = 0) and ((averagewage1 - tax1) *(percentage-higher + 1)< (averagewage2 - tax2)) and (xcor > 0)) 
      or ((preference = 0) and ((averagewage2 - tax2) *(percentage-higher + 1)< (averagewage1 - tax1)) and (xcor <= 0))
      [set decision 1
       set color red]
      
  ;; if he prefers high pension and he is from country1, but country2 tax is a certain percent higher and he has more than 15 years until retirement, he decides to move-decision 1
  ;; if he prefers high pension and he is from country2, but country1 tax is a certain percent higher and he has more than 15 years until retirement, he decides to move-decision 1 
  if ((preference = 1) and  (tax1 *(percentage-higher + 1) < tax2) and (yearsb4retirement > 15) and (xcor > 0)) 
      or  ((preference = 1) and  (tax2 *(percentage-higher + 1) < tax1) and (yearsb4retirement > 15) and (xcor <= 0))
     [set decision 1 
      set color red]
  ]
  
end
  
to change-decisions
  
  ask turtles [
   set total (count other turtles with [decision = 1] in-radius 5) ;; initialize variable total with number of neighbours that want to move
  ]

  ask turtles[
    if (total * 2 >= count other turtles in-radius 5 ) ;; if more than half of neighbours want to move, then the agent imitates them and wants to move as well 
    [set decision 1
     set color red]
  ]
end

to move
    
  ask turtles [   
    ;; if the agent has decided he wants to migrate/move, then he changes his country of residence
    ifelse (decision = 1) and (xcor > 0)   
    [move-to one-of country2]
    [ifelse (decision = 1) and (xcor <= 0)  
       [move-to one-of country1]
       []    ]
  ]
  ask turtles [ set yearsOld yearsOld + 1] ; the agents age after each execution of this procedure
end

to do-plots  
  set-current-plot "population"
  set-current-plot-pen "country1 residents"
  plot count turtles with [xcor > 0]
  set-current-plot-pen "country2 residents"
  plot count turtles with [xcor <= 0]
  set-current-plot "move"
  set-current-plot-pen "move"
  plot count turtles with [decision = 1]
  set-current-plot-pen "don't move"
  plot count turtles with [decision = 0]
end