Sunday, September 25, 2005

Methods: Make Stata Do-Files Faster with a Spreadsheet

Say you've got a long list of feeling thermometer results in a data set like the National Election Study and you want to run Chi squares on all of them with your favorite independent variable. A Stata Do-file makes it easy, but composing your Do-file in a spreadsheet program makes it even easier. NES runs its similar variables all together, so in NES 2004's post-election study, the 45 (!) feeling thermometers are in variables V045043 to V045088. One way to get results is to type your first command ...

tabulate V045043 V043116, chi2

... then copy and paste it a bunch of times ...

tabulate V045043 V043116, chi2
tabulate V045043 V043116, chi2
tabulate V045043 V043116, chi2

... then go through with the arrow keys and delete key to increase the first variable by one another bunch of times -- say, 45 in all.

Or, you could let a spreadsheet (such as the free, open-source, completely Microsoft Excel-compatible OpenOffice Calc) do the work for you.

  1. Fire up a blank sheet and type your command in Column 1, your dependent variable in Column 2, your independent variable in Column 3, and ",chi2" in Column 4.
  2. Highlight the dependent variable you just typed and use the drag arrow (or whatever that thing's called) at the bottom right of the cell to generate a list of variables as long as you want that increases by one in each row.
  3. Finish by copying each of the other three elements, highlighting the empty cells where they're needed, and pasting.
  4. Highlight the whole thing and paste it into Stata's .do file editor, or your favorite text editor, and you're done. Stata doesn't care about the extra spaces.
Be careful that some "helpful" auto-capitalization feature doesn't capitalize your tabulate command, because that will mess things up.

Something similar would probably work to generate SPSS syntax, too, but I haven't tried it yet.

Friday, September 16, 2005

LibraryThing | Catalog your books online

I'm hoping LibraryThing will be a better way to keep track of my political science books. You type in the ISBN, and it quickly sucks down the bibliographic information from the Library of Congress (first try) or Amazon.com. It's much faster and far less kludgy than that bane of my existence, the terrifically horrible EndNote.

EndNote note: One of my main complaints with EndNote has been the lack of a "reference autocomplete" function -- that is, a facility for searching your EndNote library for incomplete entries, then filling them in using the external libraries EndNote offers. I talked with the EndNote sales rep at the recent American Political Science Association annual meeting about this, and his response was essentially, "No soup for you!"

LibraryThing | Catalog your books online:

Friday, September 9, 2005

Save your favorite PocketMod

PocketMod lets you create a your own pocket-size organizer using a Flash applet. You can customize it to your heart's content. But what happens when you settle on a design you like? You can't save your layout -- unless you're one of those smart people who uses a Macintosh. Then you just hit "Save as PDF" when the print dialog comes up, and voila! (not "viola) you've got your permanent copy for endless reprinting.

Note that it seems important to go into Page Setup, select "Page Attributes," and format your document for printing on a laser printer. I just select the HP Laserjet 4100 I have in my office. If you don't do this, the bottom of the page seems to get cropped off.

Link:
PocketMod: The Free Disposable Personal Organizer

Wednesday, September 7, 2005

Unacknowledged convergence of open source, open access, and open science

A fine piece in First Monday looks at how open source and open science are converging. Among other things, the article explains one of the many reasons the business of academic journal publishing can be so frustrating for scholars. As in other concentrated industries, business models do not allow for meeting some customer demands (such as for more open and easy access to scholarship), even though desired services or products could be delivered for a vanishingly minimal additional cost.

Unacknowledged convergence of open source, open access, and open science:
The great increase in journal subscription prices over the last two decades, largely as a result of corporate concentration in scholarly publishing, has led to what economists would term the "dead–weight burden of monopoly," in which "some people’s desires will remain unsatisfied even though they could have been fulfilled at virtually no additional cost"