Tuesday, 29 August 2006

Thursday, 24 August 2006

Counterfactuals

Valéria asked me whether I thought the British empire was a good thing.

There are all sorts of interesting things one can say about the good and bad things the British did. But ultimately to answer a question like this, which is a very reasonable one to ask, we need to compare what actually happened with what would have happened supposing that the Empire had not come into being. Which of these two courses of history would have been better? This is just the same sort of question political scientists are always asking and answering. For example, after performing a logit regression (a piece of statistics where the dependent variable is binary, for example, did a particular person turn out to vote or not?) we may say: if this person had been a woman instead of a man, but everything else had been the same - if she had had the same social class, education, religiosity and so on - she would have been ten per cent more likely to vote. Maybe in some cases the regression will be misspecified or based on inaccurate data or whatever. But in principle this can be valid.

If our historical knowledge - the application of our social science knowledge - is good enough, we can answer counterfactuals about history. For example, we can guess that Hong Kong would have been worse off if it had been colonized by the Portuguese and not by the British. We can make this guess without a deep understanding of history, because Macau, a small island rather like Hong Kong, actually was colonized by the Portuguese, and has not to date been nearly as economically successful as Hong Kong. Again, our guess is not infallible. Perhaps there is something we don't know that is specific to Hong Kong. But it is a reasonable guess.

Can we make the same kind of assessment of the Empire as a whole?

To do that we need to imagine an alternative history in which the British Empire does not come into being. Several problems at once present themselves. First, we need a coherent story. Why do the British fail to colonize large parts of the world in the 19th century? Well, they could have been unable to, if they had not had an industrial revolution. But now we are answering a very different question: what would have happened if the British had not had an industrial revolution? The consequences for human history would have been much broader than the question of empire. Or perhaps, the British simply chose not to pursue their empire. But then we run into a worry about psychological plausibility. For humans not to pursue power and empire when they can runs counter to the general tendency of most of history. If we assume this is what happened, are we assuming a different kind of humanity? Gentler and kinder, or simply more prone to take its own religious ideology (the Sermon on the Mount, say) seriously? Again, that's a different question from Valéria's question about the Empire.

It is not that we cannot coherently imagine histories without a British Empire. We can imagine many. The problem is that none of them will cut the Empire neatly out of the world without cutting a great deal more besides. Another problem is that there are very many of these histories: we do not have a useful criterion for choosing which one to use as a point of moral comparison. And many of these histories will be incomplete (no use for moral evaluation) without answering a lot of questions which, again, are irrelevant to what Valéria wants to know. For example, we could imagine that the French defeat the British in the eighteenth century struggle for power. Then we will need to know whether there is a counterfactual French empire, how far it will extend, and what it will be like. Our answers to these questions will determine how we evaluate the counterfactual history. Finally, when we construct our alternative history, we need to know what the British themselves were doing (instead of having an empire). After all, they were important actors in world history. To keep our counterfactual relevant, we will need them to be doing almost exactly what they actually did, except without having an empire. But this is rather like imagining a vertebrate except without its backbone. The empire was central to what the British were doing at the time. Again, we can always think of other things they might have done, but the problem is that there are too many of these alternative courses of action, all of them with widely differing impacts on history and human happiness.

Small-scale "what ifs" are answerable and important. (That's why I believe in social science and not just in, say, narrative history.) It's easy to believe that large scale "what ifs", which look just the same grammatically, must be equally meaningful. But these considerations lead me to believe they are not. At some point of scale, we lose the ability to construct the right kind of counterfactual.

Wednesday, 23 August 2006

Fullah dolls

The Middle Eastern barbie. Check out the veil.


From http://healingiraq.blogspot.com/ via http://www.blogiraq.net
Laurence, you weren't ambling, you were flânant.

back in São Paulo

... after 4 days in Rio. Rio is beautiful - Ipanema beach has big green waves which throw up explosions of powdery surf and the whole city has huge hills growing through it. But frankly São Paulo is bigger, and as far as cities go I'm a slut for size.

There seems to be a typical Carioca (Rio inhabitant) face, a kind of pleasant squinting expression. Paulistanos claim that this is a Lamarckian adaptation, from screwing up their faces to figure out more ways to extract money from São Paulo. I'm just repeating what I've heard, you understand.

Wednesday, 16 August 2006

In Fortaleza

... in an internet cafe, reviewing a Political Science article. Two cubicles down, a couple of teenagers are looking at porn.

OTOH

I am sure that nobody who really knows me could ever describe me as misanthropic. Still, it is only fair to record that shortly after writing my last entry, I had a very delicious pizza with the nice and interesting proprietress of an art shop. So not everything in "Jeri" can be bad. And she also told me that between March and May things are much quieter and the beach is a beautiful white. Your mileage may vary.

Monday, 14 August 2006

Jeri (Not Safe For Work)

Spent the last four days in Jericoacoara. Once an idyllic fishing village on Brazil's Northern coast, it was discovered by the hippies and is now a thriving tourist resort - thriving on its own evil spume, that is. Every evening the visitors to Jericoacoara gather on top of a nearby sand dune to watch the sun set. This is a diluted relic of an earlier tradition in which, after sundown, the hippies would have a communal circle jerk and then kill and eat one of their number in a bonding ritual to prevent outsiders ever learning about "The Beach". Well, it hasn't worked and now the town is full of beach bums, preening fools and creepy older men with their teenage girlfriends. The word Jericoacoara is often shortened to "Jeri" in much the same unspeakably self-satisfied way that Wivenhoe's inhabitants call it Wiv. Coincidentally, "Geri" is also the name of a singer and former Spice Girl who, like Jericoacoara, fucking sucks.

The first people I met in "Jeri" were three American sex tourists who kindly showed me their holiday pictures, of fellatio by some poor godforsaken puta from Fortaleza. Thanks, fuckers. The second person was a gentleman from Sao Paulo who had spent twenty years cycling around Brazil in order to discover his culture. At the end of this process he had worked out that he enjoyed reggae music and smoking dope. I am sure it will surprise you to learn that his conversation had a pecuniary goal: his ultimate aim was to "mend his bicycle" and with this in mind, he attempted to sell me a bracelet made of anaconda skin. I hope that by now a kind of general picture is forming in your mind.

In fairness it must be said that an hour's walk East from the town there is a solid mile of fabulously beautiful beach surrounded by rock formations and beaten by the Atlantic surf. You will have it all to yourself because none of the tourists in Jeri can get the brain cells together to leave the town beach, which, by the way, has been invaded by some kind of black, stinking seaweed, perhaps meant by God as some kind of metaphor.

Saturday, 12 August 2006

More insight

I've worked it out: Brazilians are cockneys.

  • They pronounce words the same way. Ask a black cab driver to say Costa del Sol and it'll be just the way a Brazilian would pronounce it, i.e. "de'w so'w".
  • The Portuguese for "hi" is "oi" which must be short for "Oi oi my son!"
  • Brazilians from the Northeast love forro, which is basically just knees-up Mavver Brahn with a funny beat.

Thursday, 10 August 2006

Like looking at the future

Here's one of my (superficial but hopefully fresh) impressions. Imagine giving Britain's metropolitan elite [TM] - the chattering classes, the Islington set - total social control for twenty years, and imagine that their ideas actually worked. Well, that's Brazil in certain aspects. For example, it's ridiculously racially integrated. There is a complete chaos of ethnic types, and the melting pot seems genuinely to have melted here - compared to, say, the US. I don't say there's no racial injustice or discrimination. But there are no hard and fast colour lines.

Or take sexuality. In a town - OK, a university town - of one of the poorest states of the Northeast, they hold an annual gay pride parade, by golly. Picture that in our Northeast? Well... eesh, perhaps.

In this particular way, Brazil seems like a glimpse into our future, or at least like science fiction.

Wednesday, 9 August 2006

Joaoaoaoa Pessoaoaoa

Meh. Blogger ate the first version of my beautiful insights. So, quickly and dirtily... I arrived in Joao Pessoa yesterday morning. On the bus from Salvador I met a student returning from some kind of goddamn Communist conference. I tried to convince him of the error of his ways (with my 20 words of Portuguese) and he ended up inviting me to crash at his. This leads eventually to a night of crazy dancing with a bunch of students at the State University of Paraiba... forro (very fast side-to-side butt-shaking a deux) followed by a ?? quadrille which is kind of like a barn dance except they shouted out all the moves themselves. Big love to Marcos, Junior and Mariana e todos os outros... Marcos whipped up a poem which I will reproduce here without trying to translate:

Vejo o trabalhador
hoje como companheiro
Ombro a ombro caminhames
Seguindo nosso roteiro

Caminhamos sempre juntos
Olhando para horizonte
Contemplando a Utopia
De um dia sermos iguias
Com as nossas diferencas

not bad for five minutes eh? Marcos, fui muito legal de conhecer-te e seus amigos. Espero que nos nos encontramos de novo... 'ta bem... Dave o capitalist "Chicago Boy".



Monday, 7 August 2006

in Salvador bus station

... arrived from Lencois and heading up to Joao de Pessoa in a couple of days. I did 2 days trekking in Lencois (the Chiapada Diamantida) which is fab. beautiful and very hard work.

Since leaving my friends in Sao Paulo I seem to have been sucked into the "traveller" circuit a bit. Lots of nice people but the culture pisses me off slightly. Joe Tourist has two weeks holiday and decides how much to spend on it. These young people have X amount of money and try to make it last as long as possible, which inevitably means they end up haggling bitterly over, like, 25 pence. And they smoke dope. Meh. I dunno, am probably just a crusty old man but occasionally I feel they need a HOLIDAY IN CAMBODIA...

Monday, 31 July 2006

in Brazil

I arrived in Sao Paulo on Friday, four hours late after a traumatic flight with American Airlines. Like an experiment in 'how crap can we be and still survive in a capitalist economy?' We were stuck for three hours on the runway at JFK and nobody told us what was happening. The food, which used to be halfway decent, is now just "chicken or beef?" and vegetarian options are not possible. I assume these guys are zombies, waiting to go bust under pressure from cheapo airline competition and the weight of their debts, pensions & salaries.

Brazil is awesome. The food is delicious, people are friendly, my Portuguese is terrible. Being a political obsessive I am asking everybody about Lula. The outside world is pretty favourable to him, seeing him as one of the "good Left" as opposed to the old Chavez-style populists. Everyone here, by contrast, seems very disappointed. The corruption scandals were really serious - vote buying, links to crime etc. On the other hand, there are no very inspiring alternatives and I have not yet heard any really cogent arguments against the PT's policies. The problem if anything is what they are not doing (fixing the police and education). People believe Lula will win again and it's hard to disagree.

On Saturday morning, Norman Gall from the Fernand Braudel Institute in Sao Paulo invited me to one of their reading circles. A dozen teenagers from state schools were reading Adam Smith in Portuguese. It was inspiring to see so much talent, dedication and enthusiasm. People here become very gloomy when you ask them about politics or society. I see a lot of positives. There's tremendous energy in Sao Paulo. Little charismatic churches have popped up all over the place, scandalizing educated humanists with their unsophisticated approach (anyone can become a priest without even having studied theology!) When you stop at traffic lights, a kid will jump out in front of your car and juggle tennis balls, more or less expertly. English schools are everywhere.

BTW, for a good read on Brazil today check out Norman's paper Lula and Mephistopheles. Starts from the corruption scandals and broadens out to diagnose the whole society.

Wednesday, 5 July 2006

Essex vaut un blog

In between very dull data importing, I thought I could find time to mention Essex. I am about to leave and spend a year at Northwestern.

I've been at two universities in my life, and have had an incredibly happy time at both of them.
Among the great things this place has are psycho ducks and rabbits, Wivenhoe (aka Wiv, The Hoe, Thundercatshoe to various deranged residents), the Wivenhoe trail, and the main building , which is cunningly designed as an ornamental maze. Then there's the amazingly international student body: a sample of young, determined and smart people from all over the world.

The best thing though is the academic community, which is closeknit, friendly, unpretentious and professional. People here are incredibly generous with their time and knowledge. The seminars are great - informal but tough. The PhD students are a very varied and interesting bunch. And Essex is imbued with the spirit of the 60s, from the not-beautiful-but-just-about-lovable architecture to the democratic optimism.

Things I won't miss? The food. Not that it's bad.... I just feel that I have eaten enough Cafe Vert paninis for one lifetime.

See y'all in a year. I'm off to Chicago!

"Are you ready for the city? Is the city ready for you?"
Futureheads The City is Here for You to Use

interpolating data in R

Here's a little function that does linear interpolation of data. For example, if you have a matrix like

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] NA 1 NA NA 6 NA NA
[2,] NA 8 NA NA 5 NA NA
[3,] NA 1 NA NA 4 NA NA
[4,] NA 7 NA NA 7 NA NA
[5,] NA 9 NA NA 1 NA NA

it will be turned into

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 1 1 2.666667 4.333333 6 6 6
[2,] 8 8 7.000000 6.000000 5 5 5
[3,] 1 1 2.000000 3.000000 4 4 4
[4,] 7 7 7.000000 7.000000 7 7 7
[5,] 9 9 6.333333 3.666667 1 1 1

Columns 1, 6 and 7 have just been copied from columns 2 and 5 - i.e. this doesn't do extrapolation. Columns 3 and 4 have been interpolated linearly.

The columns of the input matrix must be either all valid, or all NA. Otherwise it will get confused. Fixes welcome.



do.interpolate <- function (m) {
if (any(is.na(m[,1]))) m[] <- rep(m[,ncol(m)], ncol(m))
else if (any(is.na(m[,ncol(m)]))) m[] <- rep(m[,1], ncol(m))
else {
p <- ncol(m)-1
m <- as.matrix(m[,c(1, ncol(m))]) %*% matrix(c(p:0/p, 0:p/p), nrow=2,
byrow=T)
}

return (m)
}

# m is a matrix with missing data
mass.interpolate <- function (m) {
for (c in 1:ncol(m))
if (any(is.na(m[,c])) & ! all(is.na(m[,c])))
stop("column ", colnames(m)[c], " of matrix m is incomplete")
valid <- c(1, which(apply(m, 2, function (x) ! any(is.na(x)))))
rvalid <- c(valid[-1], ncol(m))

for (i in 1:length(valid)) {
if (valid[i] == rvalid[i]) next # if left or rightmost cols are valid
m[ ,valid[i]:rvalid[i] ] <- do.interpolate(m[ ,valid[i]:rvalid[i],
drop=F])
}

return(m)
}

Usage: mass.interpolate(my.matrix)

Wednesday, 28 June 2006

‘Big Brother’ eyes make us act more honestly

‘Big Brother’ eyes make us act more honestly

From the article:
"We all know the scene: the departmental coffee room, with the price list for tea and coffee on the wall and the “honesty box” where you pay for your drinks – or not, because no one is watching.
"In a finding that will have office managers everywhere scurrying for the photocopier, researchers have discovered that merely a picture of watching eyes nearly trebled the amount of money put in the box....
"... In previous experiments, people consistently appeared to behave more generously than they needed to for their own self-interest, even when told their actions were anonymous. This has led an influential school of economists to argue that altruism in humans is innate, rather than being based on cynical self-interest.
"But if just a photocopied pair of eyes can treble honesty, the Newcastle team suspects that these previous experiments may somehow have been spoiled by subliminal cues that made people feel they were being watched. "

Sunday, 25 June 2006

One more juicy R tip

If you're like me, you get tired of writing:

mydata[complex.row.condition, complex.column.condition] <- mydata[complex.row.condition, complex.column.condition]+1

or similar. One solution is:

crc <- complex.row.condition
ccc <- complex.column.condition
mydata[crc,ccc]<-mydata[crc,ccc]+1
rm(ccc,crc)

which saves writing out the complex conditions more than once. But it also makes it very cluttered to read and unclear what you are doing.

My alternative solution is to place this function definition in your Rprofile.site file:

inplace <- function (f, arg=1) eval.parent(call("<-",substitute(f)[[arg+1]], f),2)

Now instead of writing, e.g.

foo[bar,baz] <- foo[bar,baz]*2

you can just write

inplace(foo[bar,baz] *2)

or instead of

foo[bar,baz] <- paste(foo[bar,baz], 1:10)

do

inplace(paste(foo[bar,baz], 1:10))

The second argument of the inplace function allows you to use it when your target for assignment is not the first argument of your inner function. For example:

inplace(sub("old", "new", foo[bar,baz]), 3)

is the same as

foo[bar,baz] <- sub("old", "new", foo[bar,baz])

What remains valid in Marxist economics?

Tyler Cowen has a go at answering this question and comes up with five ideas. They are a bit focused on early Marx for me. I would suggest:

  1. His focus on explaining institutions rather than just assuming them. This is still key to modern political economy.
  2. His class-based framework for understanding politics. This is quite a simple schema: the bourgeoisie can ally with the aristocracy or the proletariat. It's still enormously productive. Modern political science, since Olson, has been much less happy with the assumption that classes, which are groups, can automatically solve their collective action problem and come together to defend their interests. But humans seem to be better at this than theory would predict: in particular, they're willing to punish each other to maintain group norms, even at cost to themselves.
  3. Ideology. To find out why an idea is popular it is always worth asking: whose interest is it in?