Monday, March 7, 2016

Got some result for my reserve paper.

The paper was presented in MPSA2014 and ISA2014. But I had been just sitting on it until recently. The tenure anxiety got me re-working on it. After a number of hiccups (such as finding nonstationarity in the data because I forgot to consider the trend; yeah, shame on me), now I got a pretty robust result (translation: robust to FE :)).

Here's the marginal effect graph:

I will come back to this when the theory is ``calibrated''.

[method ramble #3] zinb and TSCS

Recently, I've been working on a project on the relationship between inequality and social unrests (riots and demonstrations). The whole paper rests upon a conditional hypothesis:

y*_#riots = b1*Gini + b2*d.Unemployment + b3*Gini*d.Unemployment + e ...... (1)
y*_#demos = b1*Gini + b2*d.Unemployment + b3*Gini*d.Unemployment + e ...... (2),

where y* is a latent variable for riots (and demonstrations). An MLE function, of course, is necessary given that the latent continuous y* is not observed and instead we have data that counts the NUMBER of riots (say, y_#riots) and demonstrations (say, y_#demos) in a given country-year. So far, very straightforward.

Negative binomial regression is the answer. The current Stata estimator (_xtbgreg) takes care of time-series cross-section (TSCS) data pretty efficiently.

A problem arises when there are too many zeros.

The error term e may not be iid, however, when there's a systematic reason why y_#riots (and y_#demos) has so many zeros. In other words,

if equation (1) and (2) is affected by logit functions:

y(ritos |p=1) =  b1*Gini + b2*d.Unemployment + b3*Gini*d.Unemployment + e ...... (3)
y(demos |p=1) =  b1*Gini + b2*d.Unemployment + b3*Gini*d.Unemployment + e ...... (4),

then the results of (1) and (2) are likely biased.

Zero inflated negative binomial (zinb) is the way to go; but the current estimators do not deal with take into account the TSCS structure of data. The result might very well be biased.

So far a reasonable solution I've found would be something to the effect of a bunch of pair-wise comparisons like this. It makes a lot of computational sense, but I don't think it's compelling enough to convince any reviewers.

I googled quite a bit in search of a new estimator and found this one. It seems reasonable, but how stable it is hasn't been proven.

More practical solution I can think of particularly for fixed effects would be including country-year dummies in the 'inflate' equation. Whether or not the event occurs at all, I think, is much more driven by country-year heterogeneity than how often it does (for most political event, that is).

Of course, zinb fits data, but without 'recognizing' it is time series. Nonetheless a number of papers are published using zinb on TSCS data.





Monday, February 15, 2016

FED interest changes as a tool for coercion?

In the past several years, I have increasingly run into arguments, something to the effect of

``
1) US interest rates ebb and flow with some kind of cycle,
2) when it goes down, cheap US dollar is made available to the rest of the world,
3) which developing countries, including countries like China, excessively consume (borrow),
4) and this essentially becomes pretty much a decoy because
5) when Fed increases rates, capital outflows from those countries almost instantaneously, creating capital flights.
6) Knowing this mechanism, US government is taking advantage of it to `tame' rising powers.''

I don't know who's spreading this kind of thing, but this is just a BS.

True, it's a straightforward story, that contains some drama appealing to people.

But in this story, only 1) and 2) are consistently true and, thus, the inference 4) and 6) that are based on them are just wrong.

3) is wrong, because `excessively consumption' happens only rarely and typically not in the countries that can pose any significant politco-economic threat to US. (e.g., Brazil).

5) reversal of capital flows does happen, but that hasn't necessarily created capital flights.

Most importantly, the big assumption this false story is rooted on is absolute non-sense.

Fed enjoys significant degrees of political independence from the US government, as is a typical central bank of an advanced economy (otherwise, inflation fighting is difficult). It does not accommodate the WH's foreign policy goals that diligently! In other words, whatever happens to emerging markets as a consequence of rate hikes, it's more likely to be an unintended one rather than deliberately orchestrated one.


Monday, February 8, 2016

[method ramble #2] 3D plotting in Stata.

So 2-way multiplicative interaction terms are actually best illustrated by 3D `area' plots.


The 2-dimensional plots that I've been using (and most of us have been using) are actually more of a snap shot of this. The downside of 2-D plots is of course you need to make compromise. Arbitrary decisions.

For example, consider a simple linear model with a 2-way multiplicative interaction term,

f = xb1 + yb2 + xyb3 + e,

where both x and y are continuous variable.

To present a `marginal effect' of x, that is x's effect on f conditional on y, one need to take a certain difference value (most typically dy/dx). Then you make the case that `when 1 unit changes in x, f changes this much where y values are such and such'.  This assumes that x's effect on f is strictly linear: it doesn't matter the change in x we are assuming in the 2d marginal effect figure is from 1 to 2 or 101 to 102. dy/dx assumes it's essentially the same 1-unit change.

Most often, of course, this isn't very realistic. I mean, think of diminishing marginal returns.

One needs to show the whole picture of the structure between f, x, and y just like the picture above to fully explain their relationship.

I know Matlab does it pretty well. Indeed the picture above is generated by Matlab (I believe). But I don't want to learn another package.

Stata has some functions and I tried them today.

One was _graph3d_.
The logic is simply: you have x y and z variables and locate each data point based on them.
The picture I ended up having using my exchange rate regime choice data, though, looks ugly as hell.
This isn't no post-estimation command but I used it as though it was (using predicted values of the DV).
There were, of course, some options to apply, but essentially it does a poor job showing the relationship between variables. Granted, it not like _marginsplot_ where a certain relationship is assigned and simulated, but what was advertised was much more appealing than this ugly picture.

What could've been most useful would be 3d equivalent of _marginsplot_.

Another option, which I see more often these days, is _gr twoway contour_. It should generate something like this:

The figure surely does take into account multi-dimensional variation of data and in some ways much more effective in doing that than 3-d graphs do. It took, however, forever for my macbook pro to generate this with my data (obs=1,510). I needed to go back and forth quite a bit, and if I need to spend an hour every time, this isn't feasible.

-surface- was the third one that I tried. It seemed to have all the same problems that _graph3d_ had. More importantly, it approximates the values when the variable is continuous.

So I gave up there. Spending more than a whole afternoon on a marginally fancy graph that I may or may not use for the paper I'm working on is just insane, I thought.

For now, I would just show two dy/dxs: 1) x's marginal effect conditional on y and 2) y's marginal effect conditional on x.

[method ramble #1] To start.

So it's been a while.
There hasn't simply been an issue I seriously though that I must write something about.
Or more honestly, I have grown increasingly lazier.

Instead of sporadically feeling guilty about a defunct blog, I decide to spend the space on something slightly, like really slightly, more useful.: my method.

I am not a methodologist. I like quant methods. I believe in it. But I simply wasn't trained as a methodologist and don't plan to be in the near future. But at the same time, it's been my obsession to rigorously `spend' the outcomes that methodologists `produced' because doing so seems to be leading to a better science (as well as looking cooler).

I've got a lot to catch up on that front. Methodological advancement political science as a social science field has made is more than astonishing particularly in the past 3-4 years--during which I depleted the usefulness of my outdated method skills.

A few things that I need to really LEARN pretty soon:

1. difference-in-difference
I would've used it for my dissertation if I knew it existed. I was too lazy to know that. I think I get the math, but need to get the hang of it if I want to use it to expand my speculative attacks project.

2. regression discontinuity
Again, I get the math. But need to learn the language.

3. text scraping
There are a few folks who have already well established ways in which researchers scrap data from various sources. I need to have an `original dataset' at some point and this seems to be the closest thing to tap into for now.

4. matching and other causality stuff
I mean, it's a sure thing.

These are long-term goals though. Each task wouldn't really take much time, but I am grappling with a lot of stuff and with the snowcolypse in the DC area, I have been taken hostage at home with kids for the whole first month of the year.

So mostly what I'll be posting here would be day-to-day issues and most likely frustrations I have related to methods (BROADLY DEFINED).

Tuesday, June 30, 2015

The Greek Saga (already) Revisited

I've been thinking that I need to sort things out on the Greek crisis at some point not because I would seriously work on it in the near future (I barely know about the EU) but mostly because I will be asked about this anyway in classrooms.

My understanding is generally consistent with this Vox article as well as Johnston et al. (2014).


The common currency zone was a bad idea particularly for the EU where the a great deal of heterogeneity exists amongst its members. By heterogeneity, I don't mean culture, public opinion, or even social structure. They may matter, or maybe not; it is the different level of competitiveness that pretty much pre-determined the fate of Greece along with other PIIGS (seriously though, are they really okay with being called this?).

Without really delving into the whole debate on productivity, the sectoral structures of the European economies are already self-evident about the root of this cataclysm.

The European South simply lacks the industrial sectors that can earn cash as opposed to their northern counterpart, particularly Germany. Many point to tourism, but, really? How can the seasonal and volatile supply of foreign cash keep the economy sustainable?

As the graph here shows, when an economy has little means of export and constant (actually increasing) level of import: a perfect formula for current account deficits (and mounting debt problems as the Greek government tried to borrow abroad to fill in the gap as any other government would do).

Selected macroeconomic indicators for Greece (blue) and the eurozone (red).
Sorry for the mess in the legend and axis. The slacker inside me prevails this time. Source: WDI


Of course the textbook solution is devaluation and keep the currency undervalued for a while as everybody would suggest. This option disappeared off the table as soon as Greece joined the eurozone, a timing at which Greece actually needed it so badly.

I wouldn't agree with many, however, on the fact that simply having monetary policy autonomy, the Greek economy would've been fine. The positive, growth-enhancing effect of devaluation hinges upon the assumption that it boosts price competitiveness of the economy's exports while, in the same logic, restrains the purchasing power of the imported goods.

But how much long-term positive effect of devaluation on growth (such as the heavily refuted J-curve) can one expect from an economy where exporting sectors are relatively small while the price elasticity of importing goods are low? Maybe not much.

There might be several implications coming out of this argument.

1. It's not a new crisis that came out of nowhere
What this indicates is that it's not like the Greek economy was as sound as many other European ones and the crisis kicked in all of a sudden with joining of the eurozone. Rather, the problem had been there all along. The deeper integration into the common market might have served as a tipping point in the process, but was hardly a sole source of the problem. The Greek economy had been all along (except the brief period immediately following their joining the zone, which actually exacerbated the problem).

2. Tax evasion and corruption might have played a role, but only a small role.
Many media outlets have been fighting the conservative commentators' assertion that the crisis is yet another breed of `welfare disease'. I am with them. It wasn't welfare expansion that brought about the problem. But I am not with them on the idea that tax evasion and corruption of the elites feeding on a large sum of government spending was the centerpiece of the crisis. Again, it was the lack of competitiveness combined with market integration that really drove the situation into the abyss. Tax evasion and corruption, though definitely contributed to the debt burden of the Greek government to a certain degree, weren't really THE cause.

3. Syriza is not responsible for the crisis; but they lied to the Greek people
Syriza is of course not responsible for the crisis. They came into power AFTER the whole thing erupted. Nor did they terribly mismanage the negotiation with the Troika. It was already a long shot and the Trokia seemed pretty much resolute about what they want--furthering the austerity--even before Syriza won the election. As the Vox article above points out, however, Syriza won the election by promising the Greek people that there was a reasonable exit out of this misery and it could make it happen; as long as the problem is structural, there is NO reasonable exit. If Greece leaves the common currency zone, which is increasingly likely, it's going to be a complete meltdown following a massive capital flight. If it stays, well, what awaits them is the endless agony of austerity that doesn't lead the country anywhere. A complete overhaul of the economy was necessary but the party wasn't level about it with its electorates. Okay, all political parties lie. But by lying that there's a way out, Syriza made it that much harder to reach a consensus among the Greek people for taking the hardship and embarking on a real restructuring (not useless austerity).

4. The only solution might be debt forgiveness, which is politically impossible.
All these problems wouldn't be problems, if the creditors, most of whom are the foreign governments now, simply write off the debt. This isn't a simple solution as opposed to many have suggested citing the cases of the post-war Germany, because it's all political. The West German case was unique in that the creditors -- the US -- had a strong interest to keep the economy rolling and therefore were willing to give in pretty much anything, including debt forgiveness. And this strong interest was the Cold War and the Containment policy; to contain Russians in their own empire, the allies sitting at the frontline should be helped. This wasn't a strategic doctrine; there was also a consensus among ordinary Americans (rooted in fear) on it. No such feasibility exists in the Greek case. The creditors don't have a strong interest to save the Greek economy any more (they used to, when the Grexit was seen as extremely contagious and consequential). Nor do the domestic audience of the creditors--Germans--seem to care about the case. In fact, they seem to believe that they have been helping the Greeks excessively.

I think, for now, this is enough for classroom discussions.

Tuesday, June 2, 2015

[Book Review] The Lords of Finance

Link to Goodreads.

I should never taken this book as one of those easy reads for `that 15-minutes extra time slot for which there isn't anything productive I could do'. Jumping back and forth along the timeline, the first half of the book carries a complex network of unfamiliar information, which my idle brain simply resits to remember longer than 30 minutes. Coming back to it every few weeks heavy parenting as well as the graduate school, I was always starting the book all over again, agonizingly flipping through the first 40 pages. 

That's why it took 4.5 years for me to finish the book. I bought it in Chicago O'hare Airport right after dropping off my mother-in-law, who was with us just for about two months when Alex was born, at the gate as I learned the flight was would be delayed. No wonder I am a bit emotional now.

Turning to the book itself, it's about four central bankers who attempted to save their national economies that were at the verge of collapse in the inter-war period. As with any hero stories, there's a good, masterful one (Montagu Norman of the Bank of England), a brilliant but perhaps too cool one (Benjamin Strong of New York Fed), a maverick (Emile Moreau of Banque de France), and the antagonist who survives way too long and thus sort of gets romanticized at the end of the story (Hjlmar Schaat of the Reich Bank).

Some of the things either I newly learned or found important from this book:

- While factors leading to the Depression were stacked up high already, it was really the American politicians who wanted to rein in the illusionary bubbles in the stock market who really instigated the bubbles, which bursted and started the panic.

- No less blamable was the British who longed for restore London's financial supremacy and thus hastily came back to the gold standard, at which point the depression kicked in even before the panic across the Atlantic began.

- Keynes was all cool and right about everything.

- Despite the tumult, the central bankers took extensive periods of vacations. I mean like at least several months a year.


I think I need to come back to this book again at some point after taking in some history books about the inter-war period. Hopefully, by then, I can just enjoy reading it.