Nicole in the jungle
More videos of Mickey and Nicole.
Boinging on the trampoline again. Nicole is getting better all the time and Mickey has been an expert for months.
And, yet another welly walk with Nicole.
Easter holidays
Northern flicker
There are four groups of the Northern Flicker (Colaptes auratus). This is the southernmost sub species, Colaptes auratus mexicanoides (sometimes known as the Guatemalan Flicker). It is a typical woodpecker in many ways and uses old, decaying trees for food and nesting sites. However the species also spends a surprising amount of time on the ground, often picking insects out of hard dried cow pats. This sort of complex habitat use is very common among “forest” birds. Conservation initiatives in the tropics thus need to take a quite sophisticated view of landscape connectivity and habitat diversity. It is not a simple case of planting more trees. Incidentally as I have been asked to provide georeferences and dates, all photos unless otherwise stated have been taken within 1 km of my house ( 16°42′14.62″N, 92°36′32.71″W) and on the same day that they are posted to the weblog. This was on an alder tree along the side of a small stream.
Aggregating time series in R: The Iraq body count
Yesterday I was asked whether R could be used to analyse time series. The answer is of course it can. R is used extensively in the financial sector for analysing complex time series such as stock prices. I have already included an example using R in the context of climate variability (El Niño). One challenge is that there are a lot of different ways of working with time series and representing dates. Aggregation can be rather tricky. The zoo package is one of the most powerful tools for working with time series, but it is not always simple to use. I still haven’t got my head around all the different ways to achieve results.
So here is an example. The code first reads in the data from an online database, then uses tapply to sum the number of casualties per day. Zoo is then used to aggregate by month and the total is plotted. If anyone reading this can suggest better ways to do this or add a more sophisticated analysis I would like to know.
(Open this document if the code doesn’t work due to problems with quotation marks bodycount.doc)
Or try this …
source(url(”http://duncanjg.files.wordpress.com/2008/03/bodycount.doc”)) ,
again you might need to retype the quotation marks)
library(zoo)
library(date)
a<-”http://www.iraqbodycount.org/database/download/ibc-incidents”
d<-read.csv(url(a),skip=11,header=T)
a<-tapply(d$Reported.Minimum,d$Start.Date,sum)
x <- zoo(as.vector(a), as.POSIXct(as.date(row.names(a))))
f<-function(x)as.POSIXct(as.yearmon(x))
Deaths<-aggregate(x,f, sum)
par(bg=”lightgrey”)
plot(Deaths,lwd=3,col=2)
However you get there, the result is shocking. These are documented civilian casualties and I chose the lower estimate.
Even if the trend was initially downwards after the start of the surge, it still only bottomed out at around the level it began at when the “mopping up” operations were taking place in the first few months after the invasion. The time series taken from the compiled online data base stops in January 2008, so it doesn’t take into account the recent renewal of violence. Today, Thursday 6 March there were 86 civilian dead. Two bomb attacks killed 68 in Baghdad alone. Apparently this is not an isolated incident. The trend is sadly upwards again.
Joseph Stiglitz has estimated the price of the war at 3 trillion dollars. I wasn’t even sure what a trillion was until he used the figure. It has twelve zeros, in other words a thousand billion. That works out at 30 million dollars for each dead Iraqi civilian or enough to make ever one of these people as rich as Bill Gates. No further comment, apart from a heartfelt request to visit the site of those who have worked so hard to compile this important data set and re-run the code periodically to check the updated figures.
As an addition, I was saddened to hear that Harvard professor Samantha Power has resigned from Obama’s campaign team this week, apparently for speaking too openly on this, among other, issues. I was extremely impressed by her thoughtful, yet emotional, contribution to BBC radio’s start the week in which she talked of the biography she has written on Sergio Vieira de Mello, a heroic figure who constantly impressed me in every interview I heard with him up to his tragic death in Iraq. The recent news suggests that honest, open minded expression by academics is still considered to be a liability, even for apparently honest, open minded, politicians. This is a link to the Hard Talk interview.
In flower this week
Earthquake in Lincolnshire!
I grew up in Lincolnshire which is rarely in the news, so I was quite proud to hear that it was at the epicentre of an earthquake that measured 4.8. To put this into perspective the earthquake I reported at 6:52 am on the 12 February in San Cristobal measured 5.2. However to be fair an earthquake in England is a rare event, while in Mexico we have several every year. I imagine that tomorrow’s news will be full of eye witness reports of the event. Much of the reporting will no doubt be quite light hearted. British residents don’t appreciate the sheer terror that people experience when an earthquake is felt in regions where they are destructive. Even though San Cristobal itself has had few major earthquakes, every time we feel the earth move we are very unsure how bad it could turn out to be. But this time we have been stirred rather than shaken.
As an aside I made the small illustration above using a Nasa satelite image and the excellent open source software QGIS. QGIS stands for Quantum GIS. It took less than a minute to connect to the Nasa site, download the image and find the rough epicentre. I am a great fan of Google Earth but at the moment the fact that GE has a mess of overlays at different scales is a barrier to it being used for illustration at a regional scale. Also the 3d terrain in Google Earth is great for Chiapas, but rather irrelevant in Lincolnshire.
It takes a reason to reason
Walking home from work I listened to a podcast of BBC radio’s Analysis program. It dealt with political story telling. Some of the most interesting and insightful comments were made by the American clinical psychologist and political strategist Drew Weston. Here a is a link to an interview with Weston.
In the short sound bites that were included in the analysis program Weston made the point that cold objectivity alone cannot capture peoples’ imaginations nor motivate them to think deeply. It is emotion that leads people to reflect on their own prejudices and perhaps even change their world views. He summed this up in the phrase “it takes a reason to reason”. I also liked his neat line “I don’t think anyone remembers Martin Luther King’s ‘I have a plan’ speech. “
This is relevant in the year of Barak Obama. Whatever the outcome of the primaries it is now inevitable that, one way or another, the most powerful nation in the world will soon be led by its first rational president in almost a decade. It is always easy to be cynical about politicians’ appeal to peoples’ emotions. Weston makes the point that an appeal to the right sort of emotions is much more likely to get rational things done than an appeal to logic alone. That is why Al Gore’s passionate, if not wholly accurate, treatment of the climate change issue has been such an important contribution to changing the direction of the climate debate towards one based on rational evaluation of evidence.
Nicole’s Olympic triumph
On monday Nicole took part in the Mini Olympic games at El Pequeño Sol. She had been practicing her running and jumping all weekend, but she did have a few last minute nerves. Nevertheless she played a vital role in the success of her relay team and showed great poise and balance on the high bar.
Memories from 2006
I recently uploaded this older video (November 2006, Nicole aged 1) to You Tube. It helps to fill some of the gaps between this web log and previous ones as far as family life goes. Nicole and her mum were just as beautiful then as they are now. Nicole aged one was an expert at bottom shuffling and even gave lessons on technique to Mickey. She never learnt to crawl and took some time in walking alone. Music “Ain’t that enough” an all time classic from the greatly underrated Glasgow band Teenage Fan Club. The lyrics of this lovely, heart warming song fit all the feelings we had at this time and mean a lot to our family. Every time I see this again I get a lump in my throat in spite of the very silly transitions between scenes!
The speed of change in Chiapas
This sign has been placed on the boulevard, the dual carriageway from Ecosur to the centre of the town. It is deeply symbolic of the problems we face in our daily lives here. Society clearly needs to be governed by rules, regulations and guidelines in order to work. These rules must be respected by all. This can only happen if compliance is clearly in our best interest.
No driver would ever think of slowing to 20 kmh on the busy boulevard in order to comply with this sign. It would be ludicrous and cause an accident.
If this were an isolated case we could change Chiapas tomorrow simply by taking down the sign. Unfortunately the equivalent of 20 kmh signs are posted within most aspects of environmental legislation including that for forestry, conservation of protected areas, urban planning and rural development. Even in our academic institution we have to work under an administrative framework which is notably economical in its application of logic and common sense.
I will no doubt develop on this theme as time goes on.
Relativism
The main news story in the UK last week was the reaction to the comments of the archbishop of Canterbury regarding Sharia law. There were extremely strong counter reactions to his views.
In common with the majority of the British population I felt Rowan Willamson’s position to be fundamentally dangerous. Cultural relativism is an extremely useful research tool for anthropologists, sociologists, historians and even ecologists with an interest in resource management. We should all work hard on developing the admirable skill of listening and understanding the concerns and viewpoints that are the product of alternative world views. Individuals who hold culturally imposed beliefs that differ from our own should always be respected as individuals.
However I find myself in full agreement with Richard Dawkins in rejecting the extension of relativism to include tolerance for cultural practices that violate fundamental individual rights. The most shocking elements of the Archbishop’s speech were not the ones that got the publicity.
Rowan Williamson’s position was deliberately misunderstood and shamelessly exploited by right wing critics in the UK. He clearly did not argue that public stoning and beheading should become a part of an alternative Sharia law that would be tolerated under the British Judicial system. In one sense he made a quite reasonable case that some elements of civil life, such as divorce and family disputes could be settled by Muslims under Muslim customs. However he understated the most admirable aspect of the British judicial system. It is respect for the principle that disputes are settled through the careful inspection and evaluation of empirical evidence. I was deeply disturbed by the following phrase in Williamson’s speech …. “Perhaps it helps to see the universalist vision of law as guaranteeing equal accountability and access primarily in a negative rather than a positive sense”.
Of course the system in the UK is far from perfect, but when the principle (that is expressed as the right to a fair trial) is not upheld, we are generally appalled and demand “justice”. This is not the case in all cultures. I am frequently shocked and scared by the lack of respect for the fundamental principles of (my culturally constructed notion of) justice in Mexico. Hearsay evidence is considered of greater value than forensic evidence and “criminals” are considered guilty until proven innocent. Forty percent of the Mexican prison population has not yet faced trial for the crimes of which they are accused. This is not likely to change in the near future. The Mexican population appears to have a culturally constructed tolerance for “their” form of justice, that also extends to the denigration of captured criminals on public TV stations, after they have clearly been mistreated in custody.
This is the stark problem with relativism. Ironically it leads to a defense of a dangerous division based on a classification into “them” and “us”. Go beyond the Archbishop’s polished, academic, postmodernist speech (that I admit to finding impenetrable) and you encounter a much cruder, paternalistic form of relativism in which it can be justified to state that “they” should be allowed to settle matters according to “their” customs. I have no understanding of the way Sharia law evaluates evidence. However I doubt if the archbishop does either (”This lecture will not attempt a detailed discussion of the nature of sharia, which would be far beyond my competence”) . He was making a liberal point based on tolerance of a whole culture, not on respect for individual rights. I doubt if he knows whether, in matters of divorce, if a Muslim wife is reported as seen entering a car with a stranger that this is sufficient “proof” of infidelity and grounds for a divorce settlement that British law would consider unfair (recourse to obtuse statements regarding the “neuralgic questions of the status of women and converts” just don’t cut it for me. Postmodernism gives me a bigger headache). It may well be that evidence is weighed as carefully in a Muslim court as in British civil proceedings. However the precedent set by the implementation of judicial systems outside the UK does not bode well.
Poverty in Chiapas
One aspect of life in Chiapas affects me on a daily basis. It is poverty. There are just too many moments when contact with the individuals and families leading degraded, devalued lives temporarily takes away the satisfaction and happiness that my own career and family provide, leaving me with feelings of guilt and emptiness. Over time it is too easy to become hardened and insensitive to sights that would shock most Europeans. While we do all develop our personal defense mechanisms, sadness, rejection and anger at the sight of poverty is always the right response. If we could just determine the cause, perhaps we could even eliminate this terrible evil.
The text at the end of this video points out that this family has not received the state aid that they are entitled to. In general terms much has improved for millions of Mexicans in the last decade. Infant mortality has dropped, life expectancy has improved and complete illiteracy is now rare among the young. Targeted poverty alleviation programs have helped. However few programs have been efficiently implemented in Chiapas. Many families have slipped through the flimsy safety net the state provides. The fundamental structural weakness of the rural economy has not been addressed by politicians on either side of the political spectrum, who find it easier to point to global forces outside their control.
A key point is that Mexico is a middle income country. Per capita GDP is around $US 10,000 at purchasing price parity. Even under a system in which wealth is inevitably concentrated in a few hands there is simply no need for the lower end of the scale to be set at such a low level. Relatively few people live off urban rubbish or beg at traffic lights, but the fact that the system allows any family to resort to this is clearly intolerable. It simply doesn’t have to be this way.
I am an ecologist, not a sociologist nor economist. It can be difficult to see how improved knowledge concerning the distribution and abundance of organisms can have any relevance to the larger questions of poverty. I have been involved in several research projects that have aimed at analysing linkages between biodiversity and poverty. These linkages can indeed be found. Ecologists can play positive roles in developing patterns of natural resource use that improve livelihoods. However many of the contributions that the discipline of ecology itself can make are indirect. The benefits are often long term.
This does not mean that those of us that work in the field of ecology cannot play a positive role in tackling social problems while carrying out our research. I have also worked on linkages between poverty and decision making rather more directly. It is in this area I feel I can perhaps “make a difference” through teaching methods of careful reasoning with data. An element that permeates my own thinking both in ecology and life in general is the uniqueness of individual phenomena, even when they form part of a whole. A forest is a collection of trees. A society is a collection of people, each with their own lives and aspirations. I have taught students to use Bayesian Networks and hierarchical modelling to attempt to avoid the so called “ecological fallacies” (which has little to do with ecology) that arise when classification into groups is taken too far.
I find it difficult to accept solutions to the problems of poverty based on the classification of people by ethnic group, class, gender or culture, even though such classifications, if used with great care and discretion, can sometimes be useful as research tools. If I keep up this web log for any space of time I will undoubtedly return to this theme on many occasions in the section on probability.
It is extremely frustrating to find that irrational, even self defeating decision making has become locked into aspects of the Mexican way of life as has endemic inefficiency (see the endless queue) . Attempting to teach the more subtle elements of reasoning under uncertainty can appear quite irrelevant when institutionalized ineptitude devalues even the use of simple common sense. However I will continue to make the effort.
La cola eterna
Un elemento de la vida en Chiapas que nunca puedo aceptar es ineficiencia, falta de logica y la ausencia de sentido común.
El gobierno del estado implementa multiples programas de subsidios y beneficios sociales para enfrentar la pobreza. Uno de los mas destacado es la ayuda por parte del programa Amanecer para gente de “tercer edad”. No es mi intención comentar sobre esta programa en general. La población con mas de 65 años de edad merece respeto y ayuda economica. Es la forma de pago que no es logico. Esta mañana fui a hablar con la gente esperando para recibir su ayuda. El video dice todo …..
But, for English speakers I will explain briefly anyway. The state government of Chiapas has started a program to provide a small pension to all residents over 65 years old. They receive 50 dollars per month. This is certainly not a great deal, but could be a useful supplement for the poorest residents given that a kilo of the staple tortillas still costs less than a dollar. However in order to receive this they have to wait over five hours in the tropical sun. I am at least twenty years younger than most of those in the queue, but I would probably faint on my feet if I tried to last that long. There is no point to this torture, as there are many other options available to pay the money. The simplest would be to open the desks throughout the month instead of a single day. The best would be to pay the money into a bank account and provide a cash point card.
Rationality and the lottery
The BBC web site today contained what appears to me to be a misrepresentation of decision theory. The argument goes…
“Should you invest £2 a day or use it to buy lottery tickets?
Maths makes the decision obvious. Suppose you invest two quid every day at the reasonable rate of 10%. It will take you almost exactly 50 years to accumulate £1m. To earn this same £1m in the National Lottery, you would (on average) have to match five numbers and a bonus ball, at odds of 2,330,635-to-1.
If you spent two quid a day for 50 years you would total just over 36,500 tickets and would thus have only a 1-in-63 chance of making that million pounds. However, the available image of immediate wealth subverts this rationality.”
Is this right. Is it “obvious” as the author claims. No it is not. It is far from obvious.
The calculation of compound interest is correct, although banks do not normally compound interest on a daily basis and 10% is rather optimistic. You can check by simulating the arrangement as an R function using numerical integration.
f<-function(ndays=365*50,interest=0.1,value=2){
a<-numeric(ndays)
a[1]<-value
for (i in 2:(ndays)){
a[i]<-a[i-1]+value
a[i]<-a[i]+(interest/365)*a[i]}
a}
par(bg=grey(0.92))
plot(f(v=2),type=”l”,lwd=2,col=”red”,xlab=”Number of days”,ylab=”Accumulated value”)
grid(col=1)
The money in the bank grows healthily towards the one million target. So what is wrong with the argument? The author claims that the odds of winning a million on the lottery are 2,330,635:1. This is not a fair bet, but it is not such a bad one either. You have just under one chance in two million of winning the one million on offer. The expected value of your one pound ticket is the chances of winning (admittedly very small indeed) multiplied by the sum that would be won (and of course this is very large).
1/2330636* 1000000= 0.4290674
So the expected value of your ticket is about 43p. You have superficially wasted 57p.
The story about all the interest you would get by investing the money is a misleading red herring. If you took the conclusion of a 1:63 ratio between saving and gambling seriously it would persuade you not to buy a single lottery ticket even if the odds on winning were to become more favourable than one in a two million and bettered the value of the prize. Decisions between retaining a small sum with certainty and risking a big one do always involve subjective judgement, but few would not consider the lottery worth a shot if the prize of 1 million could be won at odds of (say) 200,000:1. The author of the article would (on this erroneous logic) still be convinced that it is better to put the money in the bank.
The formula for compound interest can be written as an R function in terms of the principal (p) the number of periods in a year that interest is paid (q), interest rate (i) and number of years(n)
f1<-function(p=1,i=0.1,q=365,n=1)p*(1+(i/q))^(n*q)
So using this function, lets think this all through calmly. If you were to win the lottery tomorrow and do the same with the money as you would have done with the two pounds you spent on the ticket, i.e. invest it at a compound interest of 10% you would be colossally wealthy in fifty years time. Using the same interest rate calculation that the author assumed you would have over 148,000,000.
f1(p=1000000,n=50)
[1] 148311560
On the other hand, if you were to win your million exactly fifty years from now you would just have your million at the end of the period. This would coincide with what you would have gained from saving.
So to reiterate, all wins before the final date are worth more than the saved money in the bank at the end of fifty years, The earlier you win the better. The only addition I have made to the authors’ own argument is to assume (quite fairly) that lottery winnings also gain compound interest. The comparison the author makes between the frugal saver and the lottery player is quite unfair. It uses only the absolute minimum that a lottery win would be worth as the baseline for comparison. The expected lottery winnings at the end of fifty years are quite clearly worth very much more than one million. In fact under this model, it is easy to show that the expected amount is exactly 0.4290674 times the money that would be in the bank if you had not played the lottery, providing comparable assumptions are made regarding the use of the money.
plot(f(v=2),type=”l”,lwd=2,col=”red”,xlab=”Number of days”,ylab=”Accumulated value”)
lines(f(v=2*0.4290674),type=”l”,lwd=2,col=”blue”)
The differences between the money paid and the in expected value (in purely monetary terms) doesn’t change.The ratio between the red line (saver) and the blue line (expected value from playing the lottery and investing the proceeds) stays the same. Lottery players have (on average) an expected value of around 43% that of the savers. They are worse off, but nowhere near as irrational as the article suggests..
But we can go a step further with the argument. As you think it through and apply common sense it gets better and better for the lottery player. You clearly wouldn’t ever dream of actually investing a million you won tomorrow in order to have megabucks in fifty years time. A small fortune is worth much more to you now than an unspendable fortune in the future. In fact, to you, it is almost certainly worth much more than 148 times its future value, given the positive, life enhancing, potential of a single million. After the first million the next 147 are increasingly irrelevant to your happiness. This could be written using a function that converts money into happiness. This is a curve that reaches some sort of asymptote. The absolute level of the asymptote varies between individuals, but the shape is fixed, even for Bill Gates.
At the same time the savings should be devalued by the probability of dying before they can be used, the bank suffering a fate worse than Northern Rock, a meteorite strike, or the consequences of catastrophic global warming among a multitude of other scenarios. Depending on just how much all these trade offs come in at (which again is a rather subjective matter), your lottery ticket could easily turn out to be worth more to you than the pound you paid for it.
The original article states ..
If you spent two quid a day for 50 years you would total just over 36,500 tickets and would thus have only a 1-in-63 chance of making that million pounds.
A 1-in-63 chance during a lifetime doesn’t sound so unlikely!
It can in fact be perfectly rational to buy a lottery ticket. Which is why so many rational people do.
End line: Why should this interest a forest ecologist? Because it might explain why sustainable forestry is so difficult!
Publications
The linked file can be imported into endnote or reference manager. golicher.doc
Golicher D.J., Cayuela L., Alkemade J.R.M., González-Espinosa M. and Ramírez-Marcial N. 2007.
Applying climatically associated species pools to the modelling of compositional change in
tropical montane forests. Global Ecology and Biogeography 10.1111/j.1466-823.
Golicher J.D., O’Hara R.B., Ruíz-Montoya L., Cayuela L. 2006. Lifting a veil on diversity: a
bayesian approach to fitting relative-abundance models. Ecological Applications. 16(1): 202-
212.
Golicher J.D, Ramírez-Marcial N., y Levy-Tacher S.I. 2006. Correlations between precipitation
patterns in Southern Mexico and the El Niño sea surface temperature index. Interciencia. 31(2):
Golicher D. and Newton A.C. 2007. Applying succession models to the conservation of tropical
montane forest. En: Newton A.C. (Ed.). Biodiversity loss and conservation in fragmented forest
landscapes: the forests of montane Mexico and temperate South America. CAB International.
Wallingford, United Kingdom. pp. 200-222
Cayuela L., Golicher D.J., Rey Benayas J.M., González-Espinosa M. & Ramírez-Marcial N. 2006.
Fragmentation, disturbance and tree diversity conservation in tropical montane forests. Journal
of Applied Ecology. 43: 1172-1181
Newton A.C., Stewart G.B., Diaz A., Golicher D., Pullin A.S. 2007. Bayesian Belief Networks as a
tool for evidence-based conservation management. Journal for Nature Conservation 15: 144-
160.
Newton A.C., Marshall E., Schreckenberg K., Golicher D., te Velde D.W., Edouard F. & Arancibia E.
2006. Use of a bayesian belief network to predict the impacts of commercializing non-timber
forest products on livelihoods. Ecology and Society. 11(2): 24. [online] URL:
http://www.ecologyandsociety.org/vol11/iss2/art24
Van der Wal H., Golicher J.D., Caudillo-Caudillo S., Vargas-Domínguez M. 2006. Plant densities,
yields and area demands for maize under shifting cultivation in the Chinantla, Mexico.
Agrociencia. 40: 449-460
Cayuela L., Golicher J.D. and Rey-Benayas J.M. 2006. The extent, distribution, and fragmentation
of vanishing montane cloud forest in the Highlands of Chiapas, Mexico. Biotrópica. 38(4): 544-
554
Cayuela L., Golicher J.D., Salas Rey J., Rey Benayas J.M. 2006. Classification of a complex
landscape using Dempster-Shafer theory of evidence. International Journal of Remote Sensing.
27(10): 1951-1971
Diemont S.A.W., Martin J.F., Levy-Tacher S.I., Nigh R.B., Ramirez Lopez P., Golicher J.D. 2006.
Lacandon Maya forest management: Restoration of soil fertility using native tree species.
Ecological Engineering. 28: 205-212
González-Espinosa M., Rey-Benayas J.M., Ramírez-Marcial N., Huston M.A., Golicher D. 2004.
Tree diversity in the northern Neotropics: regional patterns in highly diverse Chiapas, Mexico.
Ecography. 27(6): 741-756
Levy Tacher S., Golicher D. 2004. How predictive is traditional ecological knowledge? the case
of the lacandon maya fallow enrichment system. Interciencia. 29(9): 496-502.




