User Tools

Site Tools


howtos:toolcoding:using_a_relative_propensity

This is an old revision of the document!


Using a relative propensity

When you have an equation with more unknowns that constraints and you want to add some assumptions to solve it you may add a relative propensity calculation. Best served by an example.

Given: households[uss,usdt,th] population[uss,th]

Want to get: peoplePerHousehold[uss,usdt,th]

constraints: population[uss,th] = sum (households[uss,usdt,th] * peoplePerHousehold[uss,usdt,th]; dim=usdt)

makeup a relative propensity: relPopPersPerHH[usdt] = where each value is related to one of the entries

Finally the math to calculate peoplePerHousehold[uss,usdt,th] is:

  local peoplePerHouseholdEst[uss,usdt,th] = households[uss,usdt,th] * peoplePerHousehold[usdt]
  peoplePerHousehold[uss,usdt,th] = population[uss,th] / peoplePerHouseholdEst[uss,usdt,th] * relPopPersPerHH[usdt]
howtos/toolcoding/using_a_relative_propensity.1289595532.txt.gz · Last modified: 2010/11/12 20:58 by shona.weldon