Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: R for Stata Users


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: R for Stata Users
Date   Fri, 26 Feb 2010 10:40:05 -0600

On Fri, Feb 26, 2010 at 10:01 AM, Cohen, Elan <[email protected]> wrote:

> > knowledge stops. I am still lost at the differences between
> > lists, data
> > frames, matrices and whatever other objects R might have
>
> http://cran.r-project.org/doc/manuals/R-intro.html#Arrays-and-matrices
> http://cran.r-project.org/doc/manuals/R-intro.html#Lists-and-data-frames
>

Well, as pretty much of R documentation, it gives the minimal amount of
information. That's how you write research papers when the manuscript
submission guidelines give the limits on the number of pages: "We used
Heckman model" assuming everybody is familiar with it. If NJC sees anything
like that on statalist, he reminds that it is nice to give the reference, at
the very least. And if you really want to have your problem or approach
explained, so that your question really gets answered, you give an extensive
description of where each thing is going: "I have the dependent variable of
main interest that is informatively missing in a good number of
observations. I believe that the reason why it is missing is explained by
the following variables. So I build a bivariate normal model to explain both
the dependent variable and the missing indicator simultaneously". Sure, R
documentations is technically correct, but it would make my life so much
easier if it were about "Why" as much as about "How"... and had a section
"You would want to use a list for... you would want to use a data frame
for..." etc. If you know the thing already, it is easy to figure out how it
is implemented based on the docs. But if you don't know how it is called,
you'll never find it, and you will have very difficult time learning it from
the manuals. Instead, you'd have to read every message on R-help to see how
other people use all these tricks (I guess the same applies to Stata and
statalist and the Tips section of SJ... but at least there's a systematic
way of finding these tricks in Stata world.) That's my biggest objection
regarding the whole R approach: it is difficult to learn, especially when
your mindset is already in Stata conventions and shortcuts.

It might be equally difficult to learn Stata if you've learned a different
set of tricks first. Sometimes when I see other people's Stata code, the
first thing I say, "Gosh, forget your Fortran habits!" (or SAS habits, or R
habits -- oftentimes, one can tell what language this program was translated
from, even though the source might have been in one's head rather than in
the actual code elsewhere.)

This is the line I give people regarding R:  It's easy to do difficult
> things but hard to do simple things.


That's a good one! Mine is: "R is a geeky language for geeks"... and I was
giving this line mostly in classes of engineering and computer science
students which, to my amazement, were not familiar with Linux.

-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index