Installing MySQL workbench on debian

July 6, 2009 at 5:49 pm | In Uncategorized | Leave a Comment

Instructions can be found here.

Landlessness in Rural India

April 24, 2009 at 9:14 pm | In Uncategorized | Leave a Comment

Ownership Holdings of Land in Rural India: Putting the Record Straight

See this post at its new location.

http://www.epw.in/uploads/articles/12028.pdf

In the past, research on land distribution in rural India has pointed
out that the surveys by the National Sample Survey Organisation have
yielded underestimates of the extent of land inequality and
landlessness. In a fresh analysis, this paper, using household level
data from the 48th and 59th rounds (1992 and 2003-04) of the NSSO, finds
that (within the limitations of the data) more than 40 per cent of
households in rural India do not own land, as much as 15 million acres
is in ownership holdings of more than 20 acres, and inequality in
ownership has worsened between 1992 and 2003-04.

This blog has a new home

April 18, 2009 at 11:38 am | In Debian, JNU, Linux | Leave a Comment

This blog has found its own home.

http://blog.agrarianresearch.org

All the existing posts have been shifted. New posts from now onwards will appear at the new location.

Vikas

ave

February 8, 2009 at 11:28 am | In GNU-R | 2 Comments

See this post at its new location

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 sub-group ranks to each observation. I can think of several situations where this would be of great value!

V.

Linc is not Cyberoam

August 10, 2008 at 6:44 am | In Debian, JNU, Linux | 8 Comments

See updates and leave comment on the new blog here.

My university uses cyberoam software for regulating internet use. It requires one to log into an account using a browser or a client software. Using the browser is a pain because one has to keep the window used for authentication open throughout the session. If you close it by mistake, cyberoam throws you out and you have to log in again to be able to use internet.

The linux client that comes with cyberoam, at least the version that was available from the cyberoam server of my university (version 1.1), is broken. On running, it just gave me a “Segmentation fault” and exited.

Subsequently, I installed Linc, a free cyberoam client, and it worked flawlessly. The website of linc is here. The only small problem I faced was that the sourceforge download page gave some errors. For others who may face the same problem, links for direct download are here:

Source

rpm

No deb package is provided at the site. I created a deb package using alien but that did not work for me (it complained about a different version of libstdc++, the c++ compiler).

However, installation from source on my Ubuntu 8.04 was straightforward. For installation on Ubuntu/Debian systems you should only need to do the following:

/> tar -xzvf linc-daemon-1.2.tar.gz
/> cd linc-daemon-1.2
/> ./configure
/> make
/> sudo make install

Once installed, create a lincrc file as specified on the linc website. Call linc whenever you want to access internet via cyberoam and there you go!! If you are using a computer that always needs to connect through cyberoam, you can configure the machine to start it when the machine starts.

It should be possible to script it with something like guessnet if the machine uses different networks at different locations and needs to go through cyberoam only on some of them. I have not tried it though.

Hope this helps.

Basic skills to use a spreadsheet software

July 28, 2008 at 1:39 pm | In Data manipulation | 1 Comment

See updates and leave comment on the new blog here.

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 of a spreadsheet and basic operations
* Navigation
* inserting and removing columns/rows
* cut-copy-paste
* paste special
* paste into word processor
* exporting and importing data to/from other formats
* other binary formats
* ascii/text/csv
** importing/exporting fixed width data
** importing/exporting delimited files
* text-to-columns
2. Use of formulae
* How to write formulae
* $ notation
* Cut-copy-paste formulae
3. Statistical and other functions
* sum,min,max,average, median, mode, range, stdev, correlation, ttest
* Data analysis functions: descriptive statistics,regression, anova
* other functions: concatenate, value, round, int
* How to search for functions
4. Graphs
* How to make different types of graphs
* Adding/removing a series
* Modifying other attributes of graph: scale, line types, titles, legend
5. Sorting
* Single variable
* Multiple variables
* Dangers of sorting
6. Pivot tables

If you find this list useful, do leave a note. Also, please comment if you have any suggestions to add to this list.

Discover your neighboring machines » Linux by Examples

March 28, 2008 at 4:55 pm | In Linux | 4 Comments

See updates and leave comment on the new blog here.

Discover your neighboring machines » Linux by Examples

Blogged with the Flock Browser

Pretty printing e-mails in mutt

February 28, 2008 at 7:54 pm | In Uncategorized | Leave a Comment

See updates and leave comment on the new blog here.

I have been looking for a good solution for pretty printing from
mutt. The best solution suggested is muttprint. The problem, however,
is that muttprint uses the latex system to print. I am not a latex
user and I do not want to install the entire latex system on my
machine just to print e-mails.

There are two other alternatives that I have come across: mp and
enscript.

Solution 1. mp

1) Install mp and mptools. On my ubuntu machine that is as simple as
/> apt-get install mp mptools

2) Add the following line to .muttrc

set print_command=”/usr/bin/mp -A4 -F -l -m -left 74 -right 74 | lpr -P printername”

I do not like the output of mp very much. It is somewhat stupid in
wrapping text across lines: it justifies the print on both sides but splits
the words wherever the number of characters hits the maximum
width.

Solution 2. enscript

enscript is insalled on most linux distribution by default.

Adding the following line to .muttrc sets mutt to print via enscript

set print_command=”enscript -Email –pretty-print -G -P printername “

The following line in .muttrc (instead of the previous one) will make
enscript print in landscape format and print in two columns.

set print_command=”enscript -Email –pretty-print -G2r -P postscript-color-pdf”

The problem with enscript is that it prints all the mail headers. Its
output is nicely formatted except for the fact that it prints all the
junk in the headers.

I do not yet know of any way of making either mutt pass only selected
headers to enscript or get enscript to skip some headers. My instinct
is that there may be some way of getting the mutt to do the job. I do
not yet know and would benefit if someone who drops by on this blog
has a solution to offer.

At the moment I am sticking to the first solution but I am looking for
a better way of using enscript.

V.

Heteroscedasticity

February 28, 2008 at 7:54 pm | In Linux | Leave a Comment

See updates and leave comment on the new blog here.

f 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 the right hand side of the model is okay.

3. If 2 does not work, you can use the white’s heteroscedasticity-corrected covariance matrices to make inference. Package car has a function hccm that gives you the heteroscedasticity-corrected covariance matrix (there is a similar function in package sandwich also). coeftest(p,vcov=hccm(p)) will give you the results of the tests using this matrix. Use these results instead of summary(p).

library(lmtest)
library(car)
bptest(p)
coeftest(p,vcov=hccm(p))

Testing weblogger mode in emacs

February 24, 2008 at 4:23 pm | In Linux | Leave a Comment

I am increasingly using emacs for a lot of things that I do (heard
this before??).

* I use emacs with mutt to compose emails.
* I use orgmode as my organiser.
* I use ess for programming environment for R.
* and I have just started using weblogger for maintaining my blog
(This is a test blog entry being send from e-macs using weblogger mode).

I do not understand much of lisp, but I have been able to edit .emacs
to customise my emacs a little bit. I am sure it can be done better –
a better written .emacs will improve the startup time for emacs — but
it does not affect me too much and I am okay living with it for the
moment. Afterall, I start (or at least try to) emacs once a session
and leave it on. For composing my e-mails, I use emacsclient.

Hurray.

V.

Next Page »

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.