##old method: expenditure transition matricies in excel spreadsheets
Not very easy to understand. Go on, keep staring.

-----------------------------------
##new method: R
#prepare workspace
library(lattice)
library(car)
library(MASS)
library(RColorBrewer)
#load data
malawi <- read.csv("MwExpends2.csv")
attach(malawi)
#only households whose tobacco status did not change (yes or no for all years)
malawi.lim <- read.csv("MwExpends4.csv")
#compare scatterplots
par(mfrow=c(2,2))
plot(rank90, rank86, main="Household Ranking, 1986-1990", xlab="Rank 1990", ylab="Rank 1986", pch=19, col=tob90)
plot(rank97, rank90, main="Household Ranking, 1990-1997", xlab="Rank 1997", ylab="Rank 1990", pch=19, col=tob97)
plot(rank06, rank97, main="Household Ranking, 1997-2006", xlab="Rank 2006", ylab="Rank 1997", pch=19, col=tob06)
plot(rank06, rank97, main="Household Ranking, 1997-2006", xlab="Rank 2006", ylab="Rank 1997", pch=19, col=hiv06v2)
#file: "scatterplot.quad"

Apologies for the lack of legends...still struggling with this one. Here, red=tobacco growers in the first 3 plots, and red = HIV presence in the last plot (bottom right)
#add lines
?????????
Well, it would be fun, but I don't know what kind of lines to add. A regression or loess line wouldn't make sense, because neither variable is dependent on the other.
------------------------------------------
#scatterplot matrix
splom(malawi.lim[ c(2,3,4,5)], groups=tob)
#file: "splom.limit"

Legend: purple = tobacco, blue = non-tobacco
------------------------------------------
#boxplots
par(mfrow=c(2,2))
boxplot(diff86.90~tob90,data=malawi, main="Change in Household Rankings 1986-1990", xlab="1 = No Tobacco, 2 = Yes Tobacco", ylab="Change in Rank") boxplot(diff90.97~tob97,data=malawi, main="Change in Household Rankings 1990-1997", xlab="1 = No Tobacco, 2 = Yes Tobacco", ylab="Change in Rank") boxplot(diff.97.06~tob06,data=malawi, main="Change in Household Rankings 1997-2006", xlab="1 = No Tobacco, 2 = Yes Tobacco", ylab="Change in Rank") > boxplot(diff.97.06~hiv06v2,data=malawi, main="Change in Household Rankings 1997-2006", xlab="1 = No HIV Deaths, 2 = 1 or more HIV Deaths", ylab="Change in Rank")
#file: "boxplots"

----------------------------------------
#parallel coordinate plots: yearly change in rank
mw <- rbind(malawi[,,3], malawi[,,4], malawi[,,5], malawi[,,6]) parcoord((mw)[, c(3,4,5,6)]) #flie: "matplot" What a mess!!

------------------------------------------
#colored by hiv06 > parcoord((mw)[, c(3,4,5,6)], col=hiv06v2)
#file: "matplot.hiv06"

Not much better. Remember that red = HIV, but the HIV data were gathered in 2006. The impact of the disease was arguably negligible before that year of study. This means that only the last one-third of the plot is meaningful--at it doesn't really tell us much.
------------------------------------------
#by cluster
parcoord((mw)[, c(3,4,5,6)], col=cluster)
#file: "matplot.cluster"

Well this one has pretty colors, but all it really tells us is that there is not really any pattern in change in ranking discernible by village cluster. Thus my failed attempt at being geographical has stalled.
------------------------------------------
#starting (1986) quartile compared to ending (2006) quartile
par(mfrow=c(2,1))
parcoord((mw)[, c(3,4,5,6)], col=q86)
parcoord((mw)[, c(3,4,5,6)], col=q06)
#file: "matplot.quartiles86.06"

Hmmm...this is a mild improvement. By coding the lines according to expenditure quartiles one can at least pick out beginning (upper) and ending (lower) positions. Makes it a bit easier to confirm that the rankings are VERY variable. Some of the colors do trend in place, especially blue, for the highest quartile. Do the rich stay right?
------------------------------------------
#by 20-year tobacco status
mw.l <- rbind(malawi.lim[,,2], malawi.lim[,,3], malawi.lim[,,4], malawi.lim[,,5])
parcoord((mw.l)[, c(2,3,4,5)], col=tob)
#file: "matplot.tob.lim"

I suppose this cleans it up a bit. In order to use the matrix coordinate plot to track tobacco growers, I had to eliminate the households which changed from year to year--which was the vast majority of them. I was left with 37 households (again, black = no, red - yes). From this, one could say that the richer families who grew tobacco and stayed with it by and large stayed in the to 50% of rankings. I probably could not have told you that from the aggregate data we've been using in the past. So...interesting, but a tad underwhelming.