Thursday, December 23, 2010

Input Output Table Analysis using PyIO ( for Large Matrix )

Recently, I have a paper assignment from my economic modelling class and spend some time to play around with PyIO, a python based application that enable IO table analysis, for sometimes. It's a great apps (not to mention it is free, fast and easy) and it had greatly reduced the amount of time for me to understand how the IO calculation actually works.

Actually you can use Matlab, Octave or mathCAD to do this, but I believe you would require more time in learning the entry command, matrix operation, balancing the table, do data transformation back and forth, etc. You wont like it, trust me !

So I decided to give PyIO a go and installed this software on my Vista 64-bit, 4 GB Memory. MS Excel is not required, but it is nice to have. I do the following to 2005 BPS 66 x 66 sector operations:

Tested and Working:
1. Sector aggregation,
2. Leontief Inverse,
3. Ghoshian Inverse,
4. Impact Analysis,
5. Output, Input, Income, Employment multiplier,
6. Key Sector Analysis (Forward & Backward Linkage), (This is imperative)
7. Multiplier Product Matrix Analysis, (This is interesting)
8. Extracting method (Removing 1 sector from the economy,
9. Push-Pull Analysis (Difficult to understand, various probability),
10. Field of Influence

Not yet tested (but it should be working though):
1. RAS update
2. Output Decomposition

Basically everything works fine, the result can be chosen, between "Interactive Excel Data Entry" or "Tab Separated Format". I often choose the later. However I did encounter serious problem when I inputted a 175 x 175 matrix. The matrix wont showed-up (as shown in the pic below). After further inspection into the code, I saw what may have caused it, apparently the windows size is hardcoded so that the horizontal grid is maxed out to a just (100-3) cells = 97 cells, arrgghh... awfully pity !

Crawling to various URL in the internet (Google search power is getting worst and worst these days, geezz..), I see a lot of junk of information regarding PyIO, no solutions of how to overcame large matrix calculation limit. I also have tried various ways from downloading py2exe apps, trying to re-write the code, but to no avail. Tired of trying, I abandon the idea of using PyIO for calculating large matrices, but that is until recently, when I uncovered that I can large matrices calculation with it..

So How?

Just use PyIO older version ("Lowtek rulez eh ?"), the one with command line, this older version is much more powerful than you think. You can download it from here: http://www.real.illinois.edu/pyio/OldversionsPyIO/pyio.zip

In the future, it will be hard to find them all, so I took the initiative to preserve this PyIO release and pack them into one zip consisting of:

  1. PyIO version 1.0
  2. Python-2.2.3
  3. Mark Hammond win32all-152.exe
  4. Numeric-23.0.win32-py2.2.exe (no longer available)
  5. Some PDF/Whitepapers mentioned in the PyIO manual
  6. Indonesian 2005 66x66 sectors and 175x175 sectors (Producers Prices), Employment, Income. (provided as-is, accuracy is not guaranteed)

You can download it from here: (multiple download link will soon be available). Credits goes to the respective apps programmers/contributors.

Instructions:

  1. Install package #2, #3, #4.. (see above)
  2. Install package #1, all into the same folder
  3. Copy your input file (in this case 175sector.txt and/or 66sector.txt into that folder too,
  4. Start -> run -> cmd
  5. Navigate to the folder, using multiple cd command
  6. type python.exe run_pyio.py, a screen like this should appear:

  7. Once you are in the menu, just type what you want to calculate, for example for "key sector analysis" then type "3" and then type"1" , enter the file name "175sector.txt", dont use excel output if you are calculating a large matrix because the result will not appear instantly, so just use the text file.
  8. Rename the output file *.out to *.txt, and use Excel to open it. All cell
    should be displayed nicely.
Okay, that's all from me, make a good use of them (what i actually mean is "Abuse It!!" :) ) , and....
Have Fun !

Wednesday, December 15, 2010

Economics of Happiness

“For 60 years, Gross Domestic Product, or GDP for short, has been the yardstick by which the world has measured and understood economic and social progress. However, it has failed to capture some of the factors that make a difference in people’s lives and contribute to their happiness, such as security, leisure,income distribution and a clean environment–including the kinds of factors which growth itself needs to be sustainable.."
- Joseph Stiglitz, “Progress, What Progress?” (March, 2009)


I'm not going to belittling GDP nor GNP as an important measures of an economy, but I should remind us, including me myself that we sometimes forget that once again Economics is never about a profit maximization nor production maximization science, it is a utility maximization science.


I always dreamed to go to NZ, admiring its beautiful landscapes, winds and cattles. And then I realize, the urges came from my expected happiness, that believes the following:

1. Money do affect happiness, at least to a certain point / cut-off value.

Beyond a certain level of income, money has little relevance with my happiness, in
fact giving me more money will give me negative happiness ?

Why ? Because more money will make me worry of economic jealousy from neighbours that will attempt to seize my money/assets forcefully even if I make my own fortune painstakingly, thus giving me an overall negative happiness.

2. Money doesn't buy me relationship, health, leisures and freedom.

Although consumerism gives people a short-run happiness to some extent, but the same economic activities that support the consumerism, drains many happiness, for example excessive work cause divorce, bad health from pollution or overworking, reduced leisure and creative activity and globally it reduce freedom (long-run happiness). This is subjective but it still can be quantified through social metrics, such as number of marriage and divorce, mental and physical health disorder records, leisure sector activities, specific crime rates, ecological deteoriation, etc.

3. Unimportant activities disallocated Resource required for sustaining life.

Why do I need to cut down forest, killing all the animal in the process, just to build a timber processing plant, where it produces carbon emission, polluting surrounding environment, just to provide woods for exported furnitures.


4. Happiness is difficult to measure, but it is not impossible.

I know that GDP/GNP is easier to calculate, convert and compare, thus it is portable statistics to make analysis of, and Happiness is subjective and can be used as political tools by the government to strengthen their legitimacy. But isn't it better to calculate something vague using imprecise tools rather than using wrong tools. it's like using GPS (precise tools to measure position) to approximate temperature (applied to measure the wrong subject) ).

Happiness Snapshot from Russia :


And also there are growing concerns among big countries to apply and incorporate Gross National Happiness (GNH) or GDH or whatever it will be called, into their national target, something that Bhutan had already done since 1972. According to Associated Press, Nov 15, 2010:

  • "There is growing international recognition that to measure national well-being and progress there is a need to develop a more comprehensive view, rather than focusing solely on gross domestic product"- Jil Matheson, UK.
  • French President Nicolas Sarkozy ... two years ago asking two Nobel prizewinning economists to devise ways to measure quality of life factors in addition to simply economic factors when France it studying its policy options.

And also some facts that although GDP have increased, happiness is decreasing :

  • American Journal of Psychiatry the rates of depression across almost all demographic groups have risen in the United States over the past 10 years, with major depression rising from 3.33 percent of U.S. adults in 1991-1992 to 7.06 percent in 2001-2002: In other words, it has more than doubled.

So.... Does Money still "Granger Cause" your Happiness ?

Sunday, November 28, 2010

Dual-Competitive Government

I just revisited my own idea during sleep. *doh*

This may be a silly idea ("Impossible") or may took many years to implement", here's how it will go...

Warning: This is a Thought Experiment, spare me the laughter... :)



The present Governmental Weakness
  1. The current government (Executive) evaluation process took a long time, 5 years or more to make the leader submit their self-evaluation. It will be to late for change to take place. We need adaptive Government with specific Key Performance Indicator which can be evaluated at any point of time by the House of Representative.

  2. The ruling government once elected was difficult to be changed. Furthermore, some people will become upset if their leader changed before their time is up. We need a system that will Zeroing the unneccessary cost of political change.

  3. There is strong suspicion that after being elected, the Executive in their 2nd to 3rd year of their ruling time will collect fortune for themselves , while in the 4th year busy polishing their record in order to win the next election. We need a system that force them NOT to do this or at least make it difficult.

  4. It's difficult for the Executive member to voice their "official" dissenting opinion/concern that serve as self-reflection and early notification for the House of Representative to embrace a "heads-up" signal when crisis arrived. We need a system that promote self-reflection mechanism without the fear of being fired or marked as rebel.

  5. Some leaders are "Leader in Crisis", typically have strong recovery management, while other "Leaders in Growth", typically have many creative ideas to make new breakthrough. We need a system that facilitate a means for both type of leaders to co-exist.
  6. There are condition where HoR doesn't do what people concerned of, in this case people can do their own "civil disobedience" and therefore crippling some of the KPI which related to a specific Leader governance that they dont like, so it will be switched to other Leader. They dont have to wait for 5 years to do it.

The Implementation

  1. The Presidential Candidate will have to campaign from the beginning stating whether they are favoring in the side of "Growth" or "Crisis", they must to pick only one. (And also their program, target, but that's not what we mainly concerned of right now).

  2. In the election, People will be asked to pick two Presidential Candidate, one from "Growth" and one from "Crisis" (ideally from different party, or different interest, and independent), simply put they will be asked to whom they will be convinient to be lead during Good Time and Bad Time. (I do strongly advocate that not at presidency level but at ministrial level, but I will accept this adjustment for simplification)

  3. Once elected, both of them (Leader in Growth and Leader in Crisis) will be given a "President" status (for a simple reason, that people have elected them), any Institution within the country will treat them as equal. HoR, based on current KPI, will appoint which President will be in charge first. (Is the country in Crisis or in Growth?)

  4. When Leader in Growth is in-charge/active, the Leader in Crisis may not protest anything, their job is simply as an observer (listen and report) and make report to House of Representative about their concern, so that the House of Representative may call the current active President.

  5. Leader in Crisis may not openly criticize, threat, undermine, hinders, remove Leaders in Growth to perform their duties, and vice versa. Such attempt can be considered as Inconstitutional by HoR. Leader in Crisis may only voice their concern to the HoR (request a meeting) and to the masses but it can be done once every several determined months, that if and only if the KPI had an strong indication that may lead toward Crisis. It is HoR job to decide whether to make Press Release or not regarding the meeting content.

  6. Each of them are required to state their KPI (low and high), Programs and Ministers. For example: Leader in Crisis will set their Economic KPI at 1% - 4%, while Leader in Growth will set their KPI at 3% - 6%. The intersect lies within 3%-4% boundaries. The job of House of representative is to set the median value, for example 3%.

  7. Leader in Crisis during "his/her inactive time" is guaranteed of equal access to information for every ministrial report. Every accsss of information is replicated between both Leader, it works like a carbon copy. Ministers must submit their report to both President.

  8. Suppose the economic growth drop to 2%, below the median value (3%), then the Leader in Crisis will automatically takeover the economic responsibilities and the condition #5 is reversed (Leader in Growth will be temporarily discharged/relieved of duty), Leader in Growth may not protest anything. The condition #5 is reversed again if economic growth is above its median value (3%), at 4%.

Interesting Features of this kind of Government

  1. Swift and legal transition in the Executive Body,
  2. It shifted the President power from monopolistic to oligopolistic, so assuming both of them craving for power, it will be a competitive government.

  3. Allow for both conservative and progressive style of government to co-exist.

  4. Different skill-sets is required for different conditions, and we let the people choose what the best for them in Bad or Good Time.

  5. There is disincentive for Executive to not performing well, they will be out of job and power.

  6. Self-Critic/Assesment can be conducted at any point of time without the fear of being fired, left hands know what right hands going to do.

  7. Still maintaining effectivity, because only one decision maker can exist at one time,

  8. Still maintining efficiency, because not all government is replicated, only the Leaders and the reports.

  9. If you think Vice President mechanism is sufficient to replace my proposal, well, I humbly think it is NOT, because VP is being hand-picked as an Aide by President and of course if must follow the President orders and have lesser power. In my type of government, it doesn't work that way.

That would be all I guess,... and ridiculous as it may seems, but since I haven't read it anywhere in the Internet, so I'll named is as "Dual-Competitive Government (DCG) " and I'll claimed it as my idea... :P

Thursday, November 25, 2010

Bacaan Ringan

The Dynamics and The Role of Government

Memang jalanan Jakarta sangat ramah dengan orang-orang yang gemar melamun seperti saya. Saya tidak diberi kesempatan untuk melepaskan diri dari hobby ini selama masih tinggal di Jakarta. Apalagi kalau hari sedang hujan, saya diberikan keleluasaan yang optimal untuk melamun.

Lamunan saya masih seputar tulisan sebelumnya mengenai vegetarianism. Bagi pembaca budiman yang bosan, saya ijinkan untuk membaca postingan lain di Blog ini yang tentunya lebih berkualitas dan berbobot. Sebelumnya sekali lagi saya utarakan disini, bahwa posisi saya dalam hal vegetarianism adalah netral. Kebetulan saja lamunan saya entah mengapa selalu mengarah ke topik ini.

Recall dari tulisan terdahulu (bisa dilihat dibawah), fungsi konsumsi Mankind dalam kondisi normal adalah: XM = XPM + XHM + XIKM+ XIBM. Dengan tingkat pertumbuhan populasi M = ICM + GMN - XMN.

Mother Earth atau Planet Bumi memiliki kapasitas maksimum dalam menampung jumlah seluruh organisme hidup. Dalam set model tulisan ini, kapasitas maksimum dari Mother Earth (ME) adalah ME = P + H + C + IK + IB +M. Cukup logis apabila diasumsikan Mankind mendapatkan tampat khusus di hati ME karena kemampuan dan tingkah lakunya. Sehingga dalam memaksimumkan kapasitasnya, ME mengikuti fungsi:

max : ME Capacity
s.t : M dan XM
dimana M adalah fungsi pertumbuhan populasi Mankind dan XM adalah fungsi konsumsi Mankind.

Melalui derivasi dan penyelesaian menggunakan Lagrange, dapat diketahui jumlah Mankind Optimum serta jumlah Konsumsi optimumnya yang sesuai dengan ME capacity. Dalam hal ini mohon untuk tidak memaksa saya mengeluarkan hitung-hitungannya. Terus terang saya sendiri belum membuatnya. Saya hanya dapat membayangkan hasil akhirnya.

Analisa sebelumnya merupakan analisa statis. Sehingga terkesan dangkal dan kurang kontroversial. Dalam hal ini saya akan memaksa dimensi waktu untuk masuk kedalam model ‘kurang kerjaan’ ini.

Dengan memasukkan analisa waktu, modelnya menjadi sedikit rumit. Konsumsi mankind menjadi XM(t) = XPM(t) + XHM(t) + XIKM(t)+ XIBM(t). Sedangkan tingkat pertumbuhan populasi mankind menjadi M(t) = ICM(t) + GMN(t) - XMN(t). Salah satu logika yang mendasari dimasukkannya variabel waktu ini adalah adanya faktor musim. Dalam suatu rentang waktu tertentu Mankind akan mengkonsumsi katakanlah herbivore lebih banyak karena sedang turun salju. Namun bisa jadi ketika sedang musim panas, Mankind akan lebih banyak mengkonsumsi Ikan. Dengan set model demikian, fungsi optimalimasi ME menjadi

max : ME Capacity (t)
s.t : M(t) dan XM(t)

Hasilnya adalah jumlah Mankind Optimum pada time (t) dan konsumsi Mankind optimum pada time (t) yang dapat diterima oleh ME. Kemudian apa dampaknya apabila suddenly Mankind menjadi vegetarian? Fungsi optimalisasinya akan berubah menjadi

max : ME Capacity (t)
s.t : M(t) dan X’M(t)
dimana X’M(t) adalah Konsumsi Mankind dalam kondisi vegetarian.

Hasil dari derivasi dan penyelesaian fungsi lagrange-nya menjadi aneh dan tidak logis. Dalam hal ini saya menyimpulkan akan terjadi natural imbalance.

Analisa diatas bisa saja dikembangkan lagi kedalam dimensi ruang dan waktu, sehingga salah satu fungsi-nya menjadi M(it) dan XM(it). Namun penyelesaian masalah ini dengan ikhlas saya serahkan bagi siapapun yang punya waktu melamun lebih banyak dari saya.



The Role of Government

Sekarang bayangkan apabila secara serta merta hadir sebuah sindikat Mankind yang menamakan dirinya government. Sindikat Mankind ini memiliki tugas yang mulia, oleh karenanya berhak mengambil pajak dari Mankind lainnya. Government dalam hal ini mempunyai dua pilihan haluan kebijakan. Pertama adalah promote vegetarianism, kedua adalah ban vegetarianism. Government dapat menggunakan kebijakan moneter atau kebijakan fiskal untuk melakukan dua pilihan haluan kebijakan tersebut.

Apabila haluan kebijakan yang dipilih adalah promote, government dapat melakukan proyek penanaman Plant (P) secara besar-besaran atau memberikan subsidi pada P. Sedangkan untuk haluan kebijakan ban, government dapat menerapkan pajak bagi P atau subsidi bagi herbivore (H).

Karena tulisan ini sudah demikian panjang, saya akan persingkat analisanya langsung pada kesimpulan. Pada haluan kebijakan promote, hasil dari kebijakan government akan mempercepat proses “vegetarianisasi”. Dengan kata lain, government akan speed up pencapaian natural imbalance. Sedangkan untuk haluan kebijakan ban, kebijakan pajak bagi P dan subsidi bagi H akan menimbulkan lonjakan populasi pada H. Which in return akan menimbulkan natural imbalance. Either way, kebijakan government akan berujung pada natural imbalance.

Sebagai penutup dari tulisan ini, poin penting yang dapat dijadikan diskusi adalah kemunculan government yang in the end selalu menimbulkan natural imbalance. Apabila Mankind dibiarkan left alone, turn around ke fungsi konsumsi semula dapat langsung dilakukan apabila benar menjadi vegetarian akan menimbulkan natural imbalance. Sedangkan dengan adanya government, turn around tersebut bisa jadi lebih lama atau kearah lain yang juga imbalance.

Tuesday, November 23, 2010

The Paradox of Specialization


"The greatest improvement in the productive powers of labour, and the greater part of the skill, dexterity, and judgment with which it is any where directed, or applied, seem to have been the effects of the division of labour"
Adam Smith ( Wealth of Nations, 1776).
Now, Lets imagine 2 economic societies, where each of them consists a total of N population, as follows :

Society #1: Adopting Specialists Strategy
[ 1 Economist + 1 Engineer + ...... + 1 Psychologist ]

All workers in society #1 are highly skilled, ie: all of them are PhD in their fields.

Society #2: Adopting Generalist Strategy
[ 1 ( Economist & Engineer ) + ...... + 1 (Economist & Psychologist ) ]

All workers in society #2 are mediumly skilled, ie: all of them are undergraduate or even less, but they had at least 2 degree in different fields.



Smith argue that this society #1 (The Specialist) is far more productive compared to society #2 (The Generalist) due to increasing return to scale properties.
 
However, I think "Smith, You are wrong !!!" *how dare of me, heheheh* I argue that society #2 will result in a far more creative, dynamic, enduring and thus a far more superior society. My arguments are as follows:

1. Dont put your eggs in one basket, if someone due to economic shock losses his/her job in society #2, he/she can switch his role easily and serve the community with different knowledge he/she posses compared to person in society #1, so society #2 has more labor/job flexibility than that of society #1 while maintaining average productivity.

2. In the light of argument above, suppose if 1 member in the society #1 died without passing their knowledge to their youngs, society #1 will experienced the effect of "forgetting a technology", but this didn't happen in society #2 because at least there are 1 other person who also know about the technology, so society #2 is more resilient in terms of preserving the technology compared to society #1.

3. According to game theory, Coordination cost will exponentially increases as each new additional node/players enter the game of cooperation. There are higher chances for society #2 member to have exactly all the required knowledge foundation with lesser people compared to society #1. It means lesser coordination cost and therefore society #2 is more liquid and more likely to complete the cooperative works in time.

4. Different knowledge exists in 1 person will allow for the ideas to meet and mate more efficiently, thus society #2 citizens are capable of creating new ideas and propagating ideas at faster speed. This also means that new ideas can be scrutinized by different people having different knowledge domain, result in having a more comprehensive and creative solution.

So, I arrived at the conclusion that "Specialization may not be that good after all !", or perhaps there should be an optimality constraint in the degree of specialization.

I rather agree with the following quote:
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects."
-Robert A. Heinlein

Okay, Smith, I'm done with you,... ;)