POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Schrodt, Philip A" <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Sat, 7 Oct 2006 09:44:39 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (123 lines)
Just to clarify a couple of points, I think one needs to distinguish three possible reasons for teaching programming. From hardest to easiest:
 
1. Programming a complex statistical routine. As Neal, Jas and others (notably Altman, Gill and McDonald's book-length exposition) have pointed out, this is really, really hard to do in a robust fashion, and not to be taken lightly. It is particularly difficult because errors often do not express themselves (as Jas pointed out, and AGM provide numerous examples): the program may appear to be working just fine, but in fact is doing really weird stuff and esssentially producing nonsense. Also, in case the original comment was ambiguous, perl is one of the *last* languages I'd ever recommend for doing statistical programming (Visual Basic is probably the absolute last...): in almost all cases, one is better off working in a statistically-oriented environment such as R, Stata or Gauss; in the absence of that, probably C++.
 
2. If one is working with primary data collection, rather than just downloading someone else's cleaned up data, there are a large number of tasks which are mind-numbing (and error-prone) if done manually, frequently awkward to do using the string-manipulation facilities of statistical packages (or macros in MS-Excel or MS-Word, which I've also seen people try to do), but very easily done in text-string-oriented language such as perl (or equivalents -- Python has a lot of fans). It is for this reason I teach perl: I'm not expecting my students to be writing Bayesian VAR estimators, but I constantly encounter cases where it would be useful for them, say, to extract numbers from a series of tables they found on the web. This is the sort of task for which perl excels -- that is what the language was designed for. These applications also involve far less risk that numerical programming, since it is usually fairly obvious whether or not the program worked (assuming one has the sense to compare the input and output)
 
3. I'm in a [tiny] minority on this final issue, but I think we should be teaching the core concepts of computer programming for the same reasons we teach the core concepts of calculus: at the graduate level, a political methodologist should know the techniques that underlie the methods that are being used in the field. At the end of a "boot camp" on calculus, most students probably will not be able to derive a non-trivial MLE, but at least they've had an introduction to the concepts, have renewed their acquaintance with algebra, and know some vocabularly. Similarly, someone with a basic introduction to perl, C++ or Java isn't going to modify the Linux core, but they will have become familiar with concepts (data structures, Boolean expressions, etc) that are used in all computational environments.

________________________________

From: Political Methodology Society on behalf of Jasjeet Singh Sekhon
Sent: Fri 10/6/2006 3:29 PM
To: [log in to unmask]
Subject: Re: [POLMETH] Programming languages



Neal and Jake raise a good point regarding the quality of code written
by most social scientists.  But the quality of professional
statistical software also leaves much to be desired. For examples of
serious quality issues see the work of B. D. McCullough including his
2003 AER article with Vinod.  In this article, a large number of
software packages give a solution when none exists because of
quasi-complete separation in a probit regression. The probit
likelihood under the usual identifying assumptions is globally concave
hence it is considered an easy optimization problem.  And
quasi-complete separation is easy to check for with analytical first
and second derivatives or with a good implementation of a modern
numerical derivative algorithm.  If these packages fail with probit,
forget about more complicated problems. "Verifying the Solution from a
Nonlinear Solver: A Case Study," American Economic Review 93(3),
873-892, 2003.

And there was the infamous WinBUGS syntax interpreter bug which parsed
-(b-c) as -b-c. Screwing up the basic properties of arithmetic---cool!
See, http://www.cognigencorp.com/nonmem/nm/99jun042004.html

Of course, I trust code from the R core team or SAS far more than that
from a random person, political scientists or not.  But show me the
source and the results of rigorous regression tests----no, not that
kind of regression, see
http://en.wikipedia.org/wiki/Regression_testing.

Cheers,
Jas.

=======================================
Jasjeet S. Sekhon

Associate Professor
Travers Department of Political Science
Survey Research Center
UC Berkeley

http://sekhon.berkeley.edu/
V: 510-642-9974  F: 617-507-5524
=======================================




Jake Bowers writes:
 > Hi All,
 >
 > Thanks to all for the insightful and interesting comments about R,
 > Stata, SPSS as well as about my off topic question!
 >
 > I had to post one more time, just to articulate one important
 > criticism of encouraging wide adoption of lower-level, high-level
 > languages (like C and Fortran): quality control. As Neal Beck put it:
 >
 > " "do you really want to now trust our colleagues to not only do good
 > work but also to program correctly?" - how many gauss/r complicated
 > maxlik/simulation resuls do you really believe?"
 >
 > Although as Jas and Phil note, the durability and power of these
 > languages are not in doubt, Neal's point deserves mention. Heck, I
 > know I have plenty of worry in my heart about and endlessly test my
 > own programs.
 >
 > Best
 >
 > Jake
 >
 >
 > Jake Bowers
 > currently:
 > Robert Wood Johnson Health Policy Scholar, '05-'07
 > Institute for Quantitative Social Science
 > Harvard University
 >
 > on leave:
 > Assistant Professor of Political Science
 > Faculty Associate in the Center for Political Studies, ISR
 > University of Michigan
 >
 > http://www.umich.edu/~jwbowers
 >

**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

**********************************************************

**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

********************************************************** 

ATOM RSS1 RSS2