Showing posts with label R. Show all posts
Showing posts with label R. Show all posts

Monday, February 11, 2013

The Enemy of my Friend - India Pakistan and Russia

This article popped up in my news feed this morning.  It is about Russia's anger that India is purchasing fighters from France. The gist of the argument is that Russia has been India's "true strategic partner" since the 1960s.  The evidence for this is that Russia has voluntarily abstained from selling weapons to India's primary enemy, Pakistan.

Russia now feels betrayed that India is not rewarding that loyalty. India is still the largest customer of Russian arms.  However, if India continues to seek alternatives, Russia could find a lucrative source of income drying up or at least becoming more difficult to assure.

Here is the money quote from the head of Rosoboroneksport:
“We do not sell military equipment to Pakistan, only because of our loyalty to India. But all other nations, with whom India does business, sell their weapons and systems to Pakistan. We are India’s true strategic partners.”
I had the data for arms networks laying around (for my dissertation) so I quickly put together graphs for both India and Pakistan.  These are the ego networks for the two states, which means that these are not the full world arms network, only those states involved in sales to either India or Pakistan.

Neither of these two graphs shows much difference in the composition of states selling weapons.  In the Pakistan network, shown at the bottom, Russia is located at the edge of the graph and is not selling directly to Pakistan.  In all other respects, though the networks are very similar.

I guess the question is now to what extent Russia has deliberately not sold to Pakistan.  If Russia has made a decision not to sell that is one thing.  If Pakistan has not tried to buy because it was being supplied by the US and its allies and wanted to maintain that source for its weapons, then this is a different conversation. The idea that Russia is engaging in a deliberate version of Heidegger's rule (The enemy of my friend if my enemy) is what is most fascinating to me about this entire episode.

Friday, September 14, 2012

A Love Hate Relationship with R is Born

I am interested in arms transfers.  I am also interested in networks. In my dissertation I am combining those two interests.  I think that I am looking at some really cool relationships.  This is well and good. However, to do this fun research stuff I have had to leave my comfort zone of STATA and work in R.  Now I am fighting through the twin troubles of learning new software (and a language to code in) and learning new models.

I did a preliminary round of study to make sure that I could do this analysis in an advanced statistics class last semester.  Over the summer R changed versions. The package I use to do my ERGM analysis broke.  That package was updated.  Then my code broke and nothing worked the past two weeks as I have tried to get my analysis done for my dissertation.

After hours of frustrated Googling, I found a note on a blog (that I can't find a link to now... arrrrrgh!) about R namespaces and needing to remove the igraph and statnet packages and reinstall statnet first in order for it to work correctly.  I did this (without reinstalling igraph, just to be sure).  Now things run.  Now I can actually do analysis and not debugging and firefighting with the software.

Enough of the hate. I love Rstudio.  After running through some model specifications last night I decided to try out the knitr package. Awesome.  I still have a lot to learn to make things into real good documents and documentation of my analyses, but you can check out this link to my output for my test models here.

And here is a network graph of France's (egocentric) arms network during the 1950s.  The network is created from the main world network.  The world network accounts for all arms transactions from 1950 to 1959.  The sociomatrix shows a 1 if state i sold weapons to state j at any point during the 10 year window.
Created Using R. Data come from SIPRI.