Exercise · Intermediate
The baseline was in December
A donor wants to know why maize is up 113% since the baseline. The baseline was taken at the harvest and the follow-up at the lean peak. Separate the calendar from the deterioration, and write the reply.
The programme’s baseline market assessment was done in December 2023. The follow-up was done in July 2024. Maize is up 113% between them and the donor has asked whether the intervention failed.
December is the harvest. July is the lean-season peak. Most of that 113% happened last year too.
The file
market-prices-2024.v1.csv — 2,273 monthly price observations from twelve
markets, seven commodities and a casual labour wage, across twenty-four months.
Synthetic, and it carries a market that measures maize by the marmite.
The task
Part one. Reproduce the 113% and then decompose it. How much of the change from December 2023 to July 2024 is the ordinary seasonal rise, and how much is a genuine year-on-year deterioration? Give both numbers and show how you separated them.
Part two. Build the comparison the baseline should have used: the same point in the season, one year apart. Report the year-on-year change at the lean peak and at the harvest, and say which of the two is the better guide to the coming year.
Part three. Compute the wage-to-maize terms of trade for every month in the series. State how much a day’s casual labour bought at each of the four reference points, and answer the donor’s question about whether wages kept pace.
Part four. Write the reply. Five sentences: what the 113% is, what the real deterioration is, what the terms of trade add, what the programme should be judged on instead, and what date the next round should be run.
What you will need to handle
Four things, and only the first is obvious.
- One market records maize by the marmite, a volume measure of about 2.7 kg, in a column labelled per kilogram. Its median maize price is 263 gourdes against about 100 elsewhere.
- Eight prices are in US dollars with the currency column still saying HTG. They read as values under 10, and an outlier filter deletes them rather than converting them at about 132 to the dollar.
- One market stops reporting for four months in 2024, exactly across the lean season, and it is the most expensive market in its district. Decide whether to use a balanced panel and say what the choice does to your numbers.
- Thirteen observations rest on a single trader quote. Not wrong, not a price.
Three reference points
Median maize is about 75 gourdes per kg in December 2023 and 130 in July 2023; about 81 and 159 in 2024. If your December-to-July figure is not near 113%, check whether the marmite market is still in your median.
The questions to answer in prose
Three sentences each.
1. The donor’s 113% is arithmetically correct and answers no useful question. Explain what a baseline and an endline at different points in a seasonal cycle measure, and give the rule you would put in the next terms of reference.
2. The casual wage rose about 10% over the two years and its purchasing power fell about 49%. Explain to a non-analyst how both can be true, and say which of the two a food security programme should report.
3. Using a balanced panel changes the Nord-Ouest May-to-June rise from 17% to 40%. Say why the unbalanced figure is lower, and whether the same risk applies to the national median you computed in part one.
What to hand in
An R script producing the seasonal decomposition, the same-season year-on-year
table, the monthly terms-of-trade series, and the five-sentence reply as a comment
at the foot of the file. Tables printed and written to outputs/.
How to know you are done
Every price figure you print says which markets it is computed over and how many. A reader can tell from your output alone whether the marmite market and the dollar entries were handled, without reading your code.