One of the most serious failures of post-independence development policies in India is the fact that, even after more than sixty years of independence, a large number of children in India do not receive basic schooling. In view of this, monitoring trends in access to basic schooling is of much interest.
While various official agencies are involved [...]
I discovered a new, very useful, R function yesterday: ave.
This is what it does: “Subsets of ‘x[]‘ are averaged, where each subset consist of those observations with the same factor levels.”
But interestingly, you can use any function other than average. The output of that function is set against each observation.
I wanted to, for example, stick [...]
Two students of social sciences who had so far used computers for limited, specific tasks recently asked me for some kind of a course outline that they should cover to pick up basic skills for using a spreadsheet software. I prepared the list and thought it may interest some others. Hence this post.
1. Basic structure [...]
If a model is estimated using the following code:
lm(y~x1+x2)->p
1. bptest(p) does the Breuch Pagan test to formally check presence of heteroscedasticity. To use bptest, you will have to call lmtest library.
2. If the test is positive (low p value), you should see if any transformation of the dependent variable helps you eliminate heteroscedasticity. Also check if [...]
Making Data Meaningful: A guide to writing stories about numbers
The blurb: The guide is intended as a practical tool to help managers,
statisticians and media relations officers use text, tables, graphics
and other information to bring statistics to life.
Get the pdf version directly [...]
sapply(a,class) gives type of field (character, numeric, or factor) for each variable in the data [...]
?rollmean (package=zoo)?rollmedian [...]
?relevel
: The levels of a factor are re-ordered so that the level specified
by ‘ref’ is first and the others are moved down. This is useful
for ‘contr.treatment’ contrasts which take the first level [...]
In my previous post on this issue, I had presented a code that made weighted boxplots and annotated them with boxplot statistics and the mean values. The problem with that code was that it printed these annotations right on the vertical axes of the boxplots. Also, a relatively minor problem was that, when the values of [...]
Here are some useful tips on [...]