Dear members,
My thanks to the following people who replied to my query -
and my apologies to anyone who may have been inadvertently left out:
Ronan Conroy
Richard Gill
Steve Langton
Simon Day
William Browne
Rob Kelly
Paul Gilbert
Nicholas J. Lee
Graham Dunn
Neal Alexander
R.C.Knodt
Peter Lane
R. Allan Reese
The following packages or languages were recommended (numbers refer
to the number of individuals who have recommended a particular item).
It appears that S-Plus is by far the most popular:
S-Plus (7) (a number of people expressly recommended using this
instead of Fortran)
S (4)
R (3)
STATA(3)
Genstat(2)
SAS (2)
C
C++
Fortran
Visual Basic
The following books were recommended
W.N.Venables & B.D.Ripley, Modern Applied Statistics with S-Plus,
2nd. ed, Springer, 1997. ISBN 0387982140
(3 recommendations)
Everitt, B.S. A Handbook of Statistical Analyses using S-Plus.
Chapman and Hall, 1994
Everitt, B. S. (1987 ). Introduction to Optimization Methods and
their Application in Statistics. London, Chapman and Hall.
McConnell, S. (1993). Code Complete: a Practical Handbook of
Software Construction. Redmond, Washington, Microsoft Press.
Genstat 5 Release 3 Reference Manual (Genstat Committee, 1993,
Clarendon Press, Oxford)
Introductory Course for Genstat 5 Release 4 (Lane & Payne, 1997,
Numerical Algorithms Group, Oxford).
I did a search on the Net and came up with the following title
intended for beginners:
Krause A. and Olsen M., The Basics of S and S-PLUS.
Springer-Verlag ppb , 1997; ISBN: 03879498
Space doesn't allow the full text of all the comments made, but here
is a selection. My apologies in advance to any authors who feel that
their remarks have been taken out of context, or otherwise
inappropriately edited.
>From Ronan Conroy:
Stata and Splus come to mind as hotbeds of innovation. It depends
on your interests. Splus seems to have a strong suit in
classification and regression tree methods while Stata has a lot of
epidemiology and time series geeks. Stata (which I know a bit about)
has loads of canned routines that take the hell out of programming
from scratch. The advantage of using a language like Stata or Splus
is there's a big user community who will help you, offer advice to
refine programmes etc. And your routine is integrated into a stats
package, requiring no special dataprep which it would if it were a
stand-alone. Splus is object oriented, like C++, while Stata's
language is more C-like.
>From Steve Langton:
Genstat or S+ .. allow you to implement non-standard
methods without having to program everything from scratch.
>From William Browne:
Being a statistical programmer myself I am often dubious of phrases
like 'this can be easily implemented on the computer'. I think they
should also have the additional phrase 'Assuming you have a reasonable
programming knowledge' as I think a lot of authors assume that because
they take programming for granted, they assume everyone else can do it
as well. As for particular books, this of course depends on the
language/package ofpreference. I personally program in C but even
here recommending a book would depend on your programming experience.
You can also use a programming language within a package eg. S plus
is quite nice to use to program new ideas initially, and will have
lots of documentation included. With regard to Engineering, I suspect
that books like 'Fortran for Engineers' were inspired by a computing
lecturer having to teach a basic course to undergraduate engineers.
As Statistics and computing are often in the same department at
university the equivalent books probably don't exist. Also if an
author states that their method can easily be implemented by
computer you could always ask for a copy of their program.
>From Nicholas J. Lee:
Often it's easier to implement a special case or
specific case of problems from some statistical model.
Generalisation often requires reasonible knowledge of low level
optimisation choices, data structures and other details.
I think the best method is to attempt to write psuedo-code initially,
without regard to any particular language. This allows you to
translate the more formal mathematical language into general computing
terms. So to answer your question, the various books on Splus (and R)
programming are probably the best for statistics. By restricting
yourself to a language that understands statistical assumptions, you
remove yourself from having to deal with the often difficult details
of file I/O, memory management, and data types. If a low level
computing language is needed, then any book directed at applied
mathematical problems should be sufficent. However I wouldn't
recommend using low level languages like Fortran, unless the people
involved had a broad knowledge of computing issues.
>From Paul Gilbert (more than one message has been quoted here)
I've programmed a lot in fortran and other languages. I
can't think of anything you could do in fortran that you can't do in
S/R. They are true programming languages in the tradition of APL.
Relative to C, you can't do pointer manipulations, but many people
consider that an improvement (and, for example, it is not allowed in
Java either). The only reason I can think to program in fortran is for
execution speed - if the computer time is more important than your
own. If you really get stuck (for example, when a vendor supplies only
C language hooks into a database, or you have working tested code in
fortran that you don't want to re-write), then S/R provide the
ability to call external code. A user cannot recognize that is
happening, and from a programmer's point of view it is effectively as
if fortran and C are subsets of S/R… the real strength of S/R is
complex mathematical procedures and coding new statistical algorithms.
Especially if your interest is research in statistical methods, rather
than using statistical methods for research in other areas, you should
seriously consider S/R. Splus is the commercially available version of
S. The non-commercial version is no longer publicly available, but the
R language is publicly and freely available. I use the notation S/R to
mean S, Splus, and R. From a programming point of view S, Splus, and
R are very similar. Splus ships additional pre-programmed functions
for doing specific analysis. These add much of what you would find in
a "standard package," like SAS or SPSS. Many of these functions have
been programmed by academics and are freely available at Statlib, and
many of them run with R too. To confuse matters further, the newest
version of Splus, based on a new version of S, has added/changed some
features of the language. For most standard numerical analysis S/R is
simply a wrapper and old proven Fortran routines are called to do the
calculations. Historically, I believe this was for two reasons. First,
the fortran routines were well tested. Second, for very intensive
calculations compiled code is faster. (S/R are interpreted - although
there are discussions of "pseudo code" which would be faster.) The
S/R wrapper adds object oriented capabilities, good graphics, and
interactive features. I have a very large library of time series code.
Time series problems, by nature, tend to suffer badly from performance
problems with interpretive code. To deal with this I coded and
debugged in S and then converted the critical loops to fortran, which
I compiled and called from S. When using this code it is impossible to
tell whether the S or compiled fortran is being used, apart from the
speed difference. Numerical results compare to machine precision.
Computers are faster now, and R does not seem to slow down in loops as
much as S did, so I rarely need to convert anything to fortran
anymore.
>From Neal Alexander:
In general I would try to avoid low level languages such as C and
FORTRAN. Some statistical packages -- such as my favourite one,
S-PLUS -- have mathematical and optimization routines which can
conveniently be linked to the more common type of statistical
function.
>From Peter Lane:
There are a few statistical systems that provide the ability to
program statistical applications in what is effectively a high-level
statistical programming language. As well as R and S, mentioned by
Paul Gilbert, the Genstat system also has such a language. The Genstat
language is command-based rather than expression-based like S. The
language is described in full in the 'Genstat 5 Release 3 Reference
Manual' (Genstat Committee, 1993, Clarendon Press, Oxford), and the
most recent training guide is 'An Introductory Course for Genstat 5
Release 4' (Lane & Payne, 1997, Numerical Algorithms Group, Oxford).
>From R. Allan Reese:
Almost all algebraic formulae..break down when implemented on a finite
machine. Secondly, almost all computer programs require far more
effort on the input/output than on the processing. A ball-park figure
might be 30% on input, 10% processing, 60% on output. The "pioneering
statistical method" is, presumably, demonstrated with an example and
happens to work well with that example. If released for general use,
it has to recognise when it may be appropriate (or NOT), detect
extreme cases or computational failures, and proof against
imcompetence if not malicious misuse. Computer programming is as easy
as climbing a cliff - you just keep moving up 'til you reach the top.
With that proviso, I'll add Stata to the list of "high-level" systems
in which novel techniques can be implemented. Or to answer the
question as posed, the Stata manual describes the language features
and the Stata Corp run distance-learning classes over the Web.
You may find it simpler to use the following e-mail address in replying:
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|