Monday, August 4, 2008

Rise and Fall of Baby Names


I pulled some girls' baby names of the Social Security website and thought it was interesting. Here low numbers are "good" i.e. #1 is rank 1. Emily has been ranked #1 for almost a decade now.

Effects of new windows

We replaced our windows Nov 06 and have wondered whether it's really made a difference. It doesn't really make sense to just compare before and after since there is variation in the temperatures and natural gas prices over time. I ran a regression using therm which is a measure of energy used as the dependent variable and heating degree days and a dummy variable that indicates when we got our new windows as independent variables.

Results:

VariableCoefficientStandard ErrorT-stat
Intercept17.822.37.75
Heating Degree Days0.210.047.86
New Windows-9.623.1-3.11


If I'm reading this correctly, we're saving about 10 therms per month?
I'm a little suspicious of OLS however since both Therms and HDD exhibit strong seasonality. The econometrics literature doesn't seem to address regressing two seasonal series against each other. Most of the univariate time series literature is concerned with autoregressive processes, integrated series, etc.

Subcompact fuel efficiency trends



This post on a proposal to buy up "clunkers" as a fiscal stimulus and at the same time address some environmental concerns had me looking at trends in fuel efficiency. I obtained the data from Appendix F of Light-Duty Automotive Technology and Fuel Economy Trends: 1975 Through 2007. I was surprised to find that since 1996 fuel efficiency had declined and that fuel efficiency of 1982 subcompacts were no better than those of today. Of course, fuel efficiency is not just a function of model year but also depends on how well the older cars have been maintained. As such, a plan to buyback "clunkers" because they are more polluting based on some model year cutoff is perhaps not the best way to approach it.

Of course, more analysis of other car classess needs to be done but since my Saturn SL2 is considered a subcompact I just went with this. What this does not show is the average weight of the vehicles in this class which has been trending upward just as fuel efficiency has been trending down. I suspect that the increasing weight of the vehicles in this class accounts for the lower fuel efficiency. This is probably explained by the disappearance of the 2-door and hatcback versions of the Honda Civic that were ubiquitous in the early 80s. With fuel prices at $4.00 a gallon we're starting to see a comeback of these 2-door cars like the Toyota Matrix

Eyeballing Appendix F for midsized cars, fuel efficiency for this class of vehicles has actually increased. From 1975 to 2007, it looks to be from around 11mpg to 24 mpg. Fuel efficiency reached 21 mpg around 1985 and seems to have hit a wall since then.

CAFE standards were enacted in 1975 which is when the data starts and if we are judging the success of CAFE solely on fuel efficiency it appears to have achieved great gains but has stagnated from the mid 80s onward. Can a new CAFE standard force the industry to achieve more gains in fuel efficiency?

But why does the industry have to wait? Perhaps the new higher gas prices might be the impetus needed to invest in the R&D that can achieve gains in fuel efficiency or has auto technology reached a plateau as far as this is concerned? Can fuel efficiency be achieved only by making vehicles lighter? Is there little advance left to be made in combustion engine technology?

Friday, August 1, 2008

Why it's so hard to read Bhagwati

Or, is Jagdish Bhagwati the next Faulkner of economics? I've been struggling with his book "In Defense of Globalization" and unfortunately, I find his speech just as tedious (note, this isn't exactly the adjective I'm looking for) but perhaps after reading this one will get the idea:
"But outsourcing happened to revive again, a couple of years ago, when the distinguished macroeconomist Alan Blinder, with us today, who was deeply influenced by Thomas Friedman’s bestselling book on globalization --- which seemed to translate the credible statement by Bangalore’s remarkable IT entrepreneurs-cum-scientists such as Nandan Nilekani that they could do everything that Americans could do into the frightening non sequitur that therefore Indians would do everything that the Americans were doing --- published an essay in Foreign Affairs (April 2006) that bought into the line that outsourcing of services on the wire would increasingly export American jobs to these countries and imperil the US and its working and middle classes."

How to treat outliers

I came across this post on outliers and was surprised to read that it pointed back to Mark Thoma who in his zeal to debunk the Laffer Curve advocated throwing out an outlier. I agree with Crooked Timber that outliers need to be treated with caution and should be excluded only after careful consideration, not because it doesn't accord with the results that we would like to have. Note that this does not say that I agree with the existence of the Laffer Curve as the WSJ was in quick to publish.

Here is how we've looked at outliers at where we work:
1. Outliers are usually but not always indicative of some possible data entry error. So these are excluded only if after checking that it was an error and there is no recoverable data, it is then set to missing.
2. If the variable is set to missing and is part of a set of predictor/covariate/independent variable (I never know which terminology to use because where I am each discipline uses her own terminology) then some statisticians might advocate some kind of imputation. (I'm not a big fan of imputation but I'll go with it for now.)
3. If outliers are valid observations then they are part of the empirics that need to be modeled, explained, what have you. We don't just throw it out because it is incovenient and does not fit with our idea of the world.

As an example, one of the problems we had was something like this:
Q. How many times did you (the parent) spank your child in the past week?
R. It must have been over 100 times.
(It was duly coded as 100.)

What was the best way to handle this record? It was obviously an outlier. In the end, after some hand wringing we set it to the maximum (the maximum excluding this outlier, that is). Was it better to set it to missing? I don't know. No imputation was performed on this variable because it was an outcome - the study wanted to test the treatment effects of some program on parental practices/style.

Biofuels and food prices

This news article form the Guardian:
Biofuels have forced global food prices up by 75% - far more than previously estimated - according to a confidential World Bank report obtained by the Guardian.
The damning unpublished assessment is based on the most detailed analysis of the crisis so far, carried out by an internationally-respected economist at global financial body. ...

It will also put pressure on the British government, which is due to release its own report on the impact of biofuels, the Gallagher Report. The Guardian has previously reported that the British study will state that plant fuels have played a "significant" part in pushing up food prices to record levels. Although it was expected last week, the report has still not been released.

Without seeing the study it is hard to determine how the 75% figure was arrived at but here is a speculation.
1. It was done using an analysis of variance so that 75 percent of the variation in the changes in food prices is caused by some variable that measures the change in the amount of biofuels produced.
2. If this is the case, then I don't really consider this causality per se but the finding is interesting nonetheless. Indeed if this is the case then I would not say that biofuels have caused food prices to go up by 75 percent.
3. It could have been done using the coefficient in a standardized regression although standardized regressions are criticized because some predictors are easier to change than others regardless of the unit of measurement. More recent discussion especially between Sander Greenland and Andrew Gelman can be found here. *
4. The results could be sensitive to the variable used to proxy for amount of biofuels produced - it could be amount of crops diverted or change in amount of bioenergy or something else although I would expect that some sensitivity analysis would have been done and perhaps the press merely used the largest number for publicity purposes.

* Sander Greenland is coauthor of "The fallacy of employing standardized regression coefficients and correlations as measures of effect" (1986) in American Journal of Epidemiology and his critique is quite harsh.

A solar power breakthrough?

MT pointed to this:
'Major discovery' from MIT primed to unleash solar revolution, Anne Trafton, News Office: In a revolutionary leap that could transform solar power from a marginal, boutique alternative into a mainstream energy source, MIT researchers have overcome a major barrier to large-scale solar power: storing energy for use when the sun doesn't shine. ...

More engineering work needs to be done to integrate the new scientific discovery into existing photovoltaic systems, but Nocera said he is confident that such systems will become a reality. ...

And a commenter:
As an engineer, I smile at the sentence "More engineering work needs to be done...". Ah, what years of sweat and tears and money burned hides behind that little innocuous sentence....

Pie in the sky? I hope not. I'm hoping to go solar in about 10 years when everything else has been paid for. Perhaps better storage technology will actually be in the market by then.