The R Statistics Language

R (also called GNU R, or even GNU S) is the open-source version of the S Programming Language, a language which fulfills the same statistical needs as SAS and SPSS. While SAS is a macro language designed for statistics, and SPSS is a macro language designed for statistics with a very nice graphical front-end, R looks like dialects ot C, acts like a dialect of LISP, and function as nifty alternative to SPSS and SAS. As I come from a programming background, R is beautiful in concept.

R’s learning curve is steep. If perl tries to make ‘impossible things hard and hard things easy,’ then R’s philosophy seems to be ‘make hard things easy and easy things hard.’ Some procedures that are complex and tedious in SPSS and R, such as taking the inverse of a matrix by the loadings of its correlation matrix as determined bya one-factor Principal Component Analysis, or PCA (in that case, it would be solve( %*% as.matrix(principal(,nfactor=1)$loadings). Other tasks are requirer a deepper understanding of the material, however. For example, in SPSS creating a ‘Component Score Coefficient Matrix’ after a PCA is as simple as ticking a check box, or adding a simple request in the macro code. In R, you need to realize that the Component Score Coefficient Matrix is actually just the inverse of a matrix multiplied by the loadings of the matrix after running it through PCA: so you’d enter the line solve( %*% as.matrix(principal(,nfactor=1)$loadings).

By far the coolest part of R and PCA is learning what unknown unknowns you forgot to solve for. For instance, a bundle of seemingly meaningless data can be examined through a ‘scree plot,’ to see which things you forgot to measure for (‘latent variables’) mattered, and which did not.

Unknown Unknowns? That’s the R

The New Bad War

I’ve said several times that as the Iraq War winds down, leftists will begin to oppose the War in Afghanistan.  Their support of the “good war” serves mainly to oppose the central front of the war on terrorism, the place where America has invested the most resources and the most effort.  As soon as the Iraq War ends, they will begin to oppose the new central front.

Because the Surge has worked better than we expected, leftist opposition to the Afghani War is building faster than I expected.  British leftist writer Robert Fisk begins the effort to make us lose in Afghanistan, in his new editorial:

And Obama and McCain really think they’re going to win in Afghanistan – before, I suppose, rushing their soldiers back to Iraq when the Baghdad government collapses. What the British couldn’t do in the 19th century and what the Russians couldn’t do at the end of the 20th century, we’re going to achieve at the start of the 21 century, taking our terrible war into nuclear-armed Pakistan just for good measure. Fantasy again.

Joseph Conrad, who understood the powerlessness of powerful nations, would surely have made something of this. Yes, we have lost after we won in Afghanistan and now we will lose as we try to win again. Stuff happens.

Robert Fisk’s World: Why does the US think it can win in Afghanistan? – Robert Fisk, Commentators – The Independent.

Leftists oppose us winning because they want voices that oppose us to be heard.  This is true on nearly every front: they oppose us not because we are wrong, but because we are strong.