Economics should be open

February 26, 2009

Save millions with less pasta water

Filed under: Uncategorized — howardchong @ 2:18 am

Harold McGee, a fabulous scientific food writer, just wrote an article in the NY Times about how to save millions annually by cooking pasta in less water. Less water = less energy to heat the water. The same principle works in washing machines; the side mounted washers use less hot water and that is one of the principal mechanisms by which they use less energy.

McGee’s point that it might save $10-$20 million annually is right, but this comes out to <10cents per year per person, which turns out to be pretty small potatoes. Still, there’s no reason to waste energy when one doesn’t need to. And most people I know hate the arduous task of dumping pasta water.

see the article:


February 25, 2009

Rosenfeld, Where Art Thou Rosenfeld?

One of the two famous "Rosenfeld Curves"

So, the above picture is the famous Rosenfeld Curve, showing that Energy Efficiency programs in California are a success. I agree they are a success, but the purpose of this post is to ask, what is the reference for the graph? Who created it? When was it first published? What are the underlying calculations? Does this include gas savings that are then converted to GWH equivalents? Is there a breakdown by utility or city or sector (residential vs commercial?) Are these explained somewhere on some sheet of paper that permits outside review?

So far, this is the best answer I’ve found:  (more…)

February 6, 2009

Traversing a directory in stata

Filed under: coding, Open Source, Stata — howardchong @ 12:17 am

I found a nice way to traverse a directory and load all the files in the directory. The key stata commands are to run a directory listing and output the list to a file. Then, you just have to use “levelsof” (or levels) to get your file names.

PROBLEM: Load a bunch of fixed-width TXT files in a directory without having to list all the file names.
STATA code

Unfortunately stata has some lame limits on the number of characters in a string (type “help limits”, 244 is the smallest limit), so this will break if you have too many files. You can probably fix this by using a matrix of strings, but I didn’t need to do that.

Another kludgy way of loading ALOT of files would be to not use levels of and each time open up the filelist.txt file and do something like “local filename_to_get=v1[`i’]” and loop over i=1 to numfiles.

Create a free website or blog at