# Basic Income - Households

Model was written in NetLogo 6.0.4
•
Viewed 241 times
•
Downloaded 12 times
•
Run 0 times

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)

Info tab cannot be displayed because of an encoding error

## Comments and Questions

Please start the discussion about this model!
(You'll first need to log in.)

Click to Run Model

globals [ gini-index-reserve lorenz-points max-wealth min-wealth ;; I included this so I could check to see if there were any negative values max-income min-income monthly-bi max-indiv-cost-of-living total-adults ] patches-own [ patch-income ;; the current amount of income on this patch monthly-income ;; patch income / 12 ] turtles-own [ wealth ;; the amount of money a turtle has after-tax ;; amount of income left after paying taxes min-indiv-cost-of-living ;; individual minimum cost of living based on minimum set on interface cost-of-living ;; cost of living calibrated for family composition num-adults ;; number of adults per household (set further down in code) num-children ;; number of children per household (set further down in code) ] ;; the different family types, for setting the number of adults and children - this model leaves out roommates and extended family breed [couples-no-children couple-no-children] breed [couples-1-child couple-1-child] breed [couples-2-children couple-2-children] breed [couples-3-children couple-3-children] breed [singles-no-children single-no-children] breed [singles-1-child single-1-child] breed [singles-2-children single-2-children] breed [singles-3-children single-3-children] ;;; ;;; SETUP AND HELPERS ;;; to setup clear-all ;; call other procedures to set up various parts of the world setup-patches setup-turtles update-lorenz-and-gini reset-ticks end ;; set up the initial amounts of income each patch has to setup-patches ask patches ;; set up patch income random amount depending on distribution chosen [ if income-distribution = "random" [ set patch-income random (mean-indiv-annual-income * 2) ] if income-distribution = "normal" [ set patch-income random-normal mean-indiv-annual-income (mean-indiv-annual-income / 2) ;; latter value is an estimate of the standard deviation based on what the curve looks like ] if income-distribution = "exponential" [ set patch-income random-exponential (mean-indiv-annual-income) ] ;; keep income ≥ 0 if patch-income < 0 [ set patch-income 0 ] ;; set colour so richer patches have darker colour (in quintiles) set max-income max [ patch-income ] of patches ;; find highest income if patch-income < max-income * 1 / 5 [ set pcolor 58 ] ;; colour patches based on income levels if patch-income >= max-income * 1 / 5 and patch-income < max-income * 2 / 5 [ set pcolor 57 ] if patch-income >= max-income * 2 / 5 and patch-income < max-income * 3 / 5 [ set pcolor 56 ] if patch-income >= max-income * 3 / 5 and patch-income < max-income * 4 / 5 [ set pcolor 55 ] if patch-income >= max-income * 4 / 5 [ set pcolor 54 ] ] end ;; set up the initial values for the turtle variables to setup-turtles set-default-shape turtles "house" ;; determine composition of the different households based on demographics ( * .25 etc) entered here create-couples-no-children num-households * .25 ask couples-no-children [ set num-adults 2 set num-children 0 ] create-couples-1-child num-households * .10 ask couples-1-child [ set num-adults 2 set num-children 1 ] create-couples-2-children num-households * .11 ask couples-2-children [ set num-adults 2 set num-children 2 ] create-couples-3-children num-households * .05 ask couples-3-children [ set num-adults 2 set num-children 3 ] create-singles-no-children num-households * .39 ask singles-no-children [ set num-adults 1 set num-children 0 ] create-singles-1-child num-households * .06 ask singles-1-child [ set num-adults 1 set num-children 1 ] create-singles-2-children num-households * .03 ask singles-2-children [ set num-adults 1 set num-children 2 ] create-singles-3-children num-households * .01 ask singles-3-children [ set num-adults 1 set num-children 3 ] ask turtles [ move-to one-of patches with [not any? turtles-here] ;; if cost of living is to vary randomly do that here, otherwise set it at the minimum cost of living ifelse allow-varied-indiv-min-cost-of-living [ set min-indiv-cost-of-living random-normal min-monthly-cost-of-living-per-adult (min-monthly-cost-of-living-per-adult / 6) set max-indiv-cost-of-living max [min-indiv-cost-of-living] of turtles ] [ set min-indiv-cost-of-living min-monthly-cost-of-living-per-adult ] ;; adjust cost of living for family composition if num-adults = 1 [ set cost-of-living min-indiv-cost-of-living * ( 1 + ( num-children * top-up-children / 100 )) ] if num-adults = 2 [ set cost-of-living min-indiv-cost-of-living * ( 1.67 + ( num-children * top-up-children / 100 )) ] ;; determine wealth of individuals if inheritance-distribution = "random" ;; wealth [ set wealth random (mean-indiv-inheritance * 2) ] if inheritance-distribution = "normal" [ set wealth random-normal mean-indiv-inheritance (mean-indiv-inheritance / 4) ;; latter value is an estimate of the standard deviation ] if inheritance-distribution = "exponential" [ set wealth random-exponential (mean-indiv-inheritance) ] if wealth <= 0 [ set wealth 1 ] ;; if there are two adults in a household, double the wealth if num-adults = 2 [ set wealth wealth * 2 ] ;; colour turtles according to their relative wealth (this is reset at every step) color-turtles ;; if there's an inheritance tax, tax wealth at the beginning during set up (if progressive, use quintiles to set tax rate) if inheritance-tax = "flat" [ set wealth wealth * ( 1 - max-tax-rate / 100 ) ] if inheritance-tax = "progressive" [ if color = 1 [ set wealth wealth * (1 - max-tax-rate / 100) ] if color = 2 [ set wealth wealth * (1 - 0.8 * max-tax-rate / 100) ] if color = 3 [ set wealth wealth * (1 - 0.6 * max-tax-rate / 100) ] if color = 4 [ set wealth wealth * (1 - 0.4 * max-tax-rate / 100) ] if color = 5 [ set wealth wealth * (1 - 0.2 * max-tax-rate / 100) ] ] ;; set the household monthly income at 1/12 of the patch income; double it for two-adult households set monthly-income patch-income / 12 if num-adults = 2 [ set monthly-income monthly-income * 2 ] face one-of neighbors4 ] end ;;; ;;; GO AND HELPERS ;;; to go ask turtles [ upgrade-income ;; move to neighbouring patch if it has more income update-wealth ;; add net income to wealth color-turtles ;; set colour according to wealth quintile ] update-lorenz-and-gini set min-income min [ patch-income ] of patches set min-wealth min [ wealth ] of turtles tick end to go-ten-years ask turtles [ upgrade-income ;; move to neighbouring patch if it has more income update-wealth ;; add net income to wealth color-turtles ;; set colour according to wealth quintile ] update-lorenz-and-gini tick if ticks = 120 [ reset-ticks stop ] end ;; determine the direction which is most profitable for each turtle in ;; the surrounding patches within one patch ;; the only way I could get this to work was to have them just check one direction per tick to upgrade-income ;; turtle procedure - move to a higher paying patch next door if you can let patch-income-ahead patch-income-at-angle 0 ;; if patch ahead has a higher income, go to it; and either way, rotate right 90° if (patch-income-ahead > patch-income) [ if not any? other turtles-on patch-ahead 1 [ forward 1 ]] rt 90 set monthly-income patch-income / 12 if num-adults = 2 [ set monthly-income monthly-income * 2 ] end ;; check out which neighbouring patch has the highest income (cribbed from ants) to-report patch-income-at-angle [angle] let p patch-right-and-ahead angle 1 report [patch-income] of p end ;; add monthly income to wealth and subtract cost of living; grade cost of living to income if high enough to update-wealth ;; set income tax rate: after-tax = proportion of income left after paying taxes if income-tax = "none" [ set after-tax 1 ] if income-tax = "flat" [ set after-tax 1 - max-tax-rate / 100 ] if income-tax = "progressive with loopholes for rich" [ set max-income max [ patch-income ] of patches * 2 / 12 if monthly-income >= max-income * 4 / 5 [ set after-tax 1 - 0.6 * (max-tax-rate / 100) ] if monthly-income >= max-income * 3 / 5 and monthly-income < max-income * 4 / 5 [ set after-tax 1 - 0.8 * (max-tax-rate / 100) ] if monthly-income >= max-income * 2 / 5 and monthly-income < max-income * 3 / 5 [ set after-tax 1 - 0.6 * (max-tax-rate / 100) ] if monthly-income >= max-income * 1 / 5 and monthly-income < max-income * 2 / 5 [ set after-tax 1 - 0.4 * (max-tax-rate / 100) ] if monthly-income < max-income * 1 / 5 [ set after-tax 1 - 0.2 * (max-tax-rate / 100) ] ] if income-tax = "progressive no loopholes for rich" [ set max-income max [ patch-income ] of patches * 2 / 12 if monthly-income >= max-income * 4 / 5 [ set after-tax 1 - 1.0 * (max-tax-rate / 100) ] if monthly-income >= max-income * 3 / 5 and monthly-income < max-income * 4 / 5 [ set after-tax 1 - 0.8 * (max-tax-rate / 100) ] if monthly-income >= max-income * 2 / 5 and monthly-income < max-income * 3 / 5 [ set after-tax 1 - 0.6 * (max-tax-rate / 100) ] if monthly-income >= max-income * 1 / 5 and monthly-income < max-income * 2 / 5 [ set after-tax 1 - 0.4 * (max-tax-rate / 100) ] if monthly-income < max-income * 1 / 5 [ set after-tax 1 - 0.2 * (max-tax-rate / 100) ] ] ;; set redistribution if income-redistribution = "none" [ set monthly-bi 0 ] if income-redistribution = "universal demogrant" ;; give everyone the same top-up [ if num-adults = 1 [ set monthly-bi max-bi-indiv / 12 ] if num-adults = 2 [ if BI-unit = "BI by individual" [ set monthly-bi 2 * max-bi-indiv / 12 ] if BI-unit = "BI by family" [ set monthly-bi max-bi-family / 12 ] ] ] if income-redistribution = "NIT with clawback" ;; calculate partial BI after clawback [ if num-adults = 1 [ set monthly-bi max-bi-indiv / 12 ] if num-adults = 2 [ if BI-unit = "BI by individual" [ set monthly-bi 2 * max-bi-indiv / 12 ] if BI-unit = "BI by family" [ set monthly-bi max-bi-family / 12 ] ] ifelse (monthly-income * after-tax * (clawback / 100)) < monthly-bi ;; is after tax income too high with clawback?, if not proceed [ set monthly-bi monthly-bi - (monthly-income * after-tax * (clawback / 100)) ] ;; for NIT, if after-tax income is too high, don't give a BI [ set monthly-bi 0 ] ] ;; update amount of BI with amount for children set monthly-bi monthly-bi + monthly-bi * num-children * top-up-children / 100 ;; calculate new wealth ifelse ((monthly-bi + (monthly-income * after-tax)) * 3 / 4) < cost-of-living ;; deduct cost of living [set wealth wealth + monthly-bi + (monthly-income * after-tax) - cost-of-living ] [set wealth wealth + monthly-bi + (monthly-income * after-tax / 4) ] end to color-turtles set max-wealth max [ wealth ] of turtles if wealth < max-wealth / 5 [ set color 5 ] if (wealth >= max-wealth / 5 and wealth < max-wealth * 2 / 5) [ set color 4 ] if (wealth >= max-wealth * 2 / 5 and wealth < max-wealth * 3 / 5) [ set color 3 ] if (wealth >= max-wealth * 3 / 5 and wealth < max-wealth * 4 / 5) [ set color 2 ] if (wealth >= max-wealth * 4 / 5) [ set color 1 ] if wealth <= 0 [ set wealth 1 set color red ] end ;; this procedure recomputes the value of gini-index-reserve ;; and the points in lorenz-points for the Lorenz and Gini-Index plots ;; it is taken directly from Uri Wilensky's Wealth Distribution ABM to update-lorenz-and-gini let sorted-wealths sort [wealth] of turtles let total-wealth sum sorted-wealths let wealth-sum-so-far 0 let index 0 set gini-index-reserve 0 set lorenz-points [] ;; now actually plot the Lorenz curve -- along the way, we also ;; calculate the Gini index. ;; (see the Info tab for a description of the curve and measure) repeat count turtles [ set wealth-sum-so-far (wealth-sum-so-far + item index sorted-wealths) set lorenz-points lput ((wealth-sum-so-far / total-wealth) * 100) lorenz-points set index (index + 1) set gini-index-reserve gini-index-reserve + (index / num-households) - (wealth-sum-so-far / total-wealth) ] end ; Copyright 1998 Uri Wilensky and 2018 Sarah Robertson ; See Info tab for full copyright and license.

There is only one version of this model, created over 3 years ago by Sarah Robertson.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

Basic Income - Households.png | preview | Preview for 'Basic Income - Households' | over 3 years ago, by Sarah Robertson | Download |

This model does not have any ancestors.

This model does not have any descendants.