Tim Thomas's Research Site

Helping the poor and protecting the environment using the tools of GIS and econometrics

Welcome

The purpose of this webpage is to make available to researchers papers and programs in my areas of interest. I try to use the tools of econometrics and GIS to research issues related to economic development and tropical deforestation. My hope is that through my research, poverty will be reduced, and the environment will be used in a sustainable and sensible way. On a more theoretical note, I hope to contribute to the growing field of spatial econometrics.

You may want to try some of my tools for working with sparse matrices in MatLab. MatLab has the unfortunate tendency to form unnecessarily large sparse matrices. For example, with a sparse W matrix at 3.2MB and 5,661 cells square, we find that W*W takes up 88MB, but that has a lot of zeros -- something a sparse matrix is designed not to have. When I eliminate the zeros, it shrinks to a more reasonable 10MB. It gets worse: W*W*W is 280MB with all the extra zeros, but 20MB without them. And for W*W*W*W, the matrix is 385MB as a sparse matrix, while the full version of the matrix is 256MB, and the sparse matrix with the zeros removed is only 31MB. If we are willing to discard elements smaller that 0.000001, then the matrix shrinks further to 19MB.

The programs and documents here are provided in good faith. I try to provide programs that are useful and correct. However, there are no guarantees that these programs and papers are without errors. Many of them have not been refereed, and checking one's own work is no guarantee of correctness. If you should find any errors in the programs or papers, please email me, and I will try to repair them as best as possible. I also welcome any comments, suggestions, or discussions.

Thanks for stopping by!


Spatial econometrics

I have been working on the spatial probit for a couple of years now. I have written a program, based on the one by Jim LeSage, that handles not only the probit, but the tobit and linear model, as well. The program uses MCMC methods. It no longer requires downloading Jim's toolboxes, though I cannot imagine why anyone using MatLab would not want them. I am indebted to Jim LeSage for doing the pioneering work of generating the programs, writing correspoding textbooks, and making all of this publicly available at his website. I highly recommend downloading his textbooks, especially the spatial econometrics textbook.

A suggested citation for the notes on the spatial probit might be as follows:

    Thomas, Timothy S. 2007. "A Primer for Bayesian Spatial Probits, With an Application to Deforestation in Madagascar", Companion Paper for the World Bank Policy Research Report on Forests, Environment, and Livelihoods, Washington, D.C. Downloaded from http://www.timthomas.net.

Similar citations could be used for the programs. Likewise, LeSage's Econometrics Toolbox might be cited as:

    LeSage, James P. 2003. "Econometrics Toolbox", MatLab programs. Downloaded from http://www.spatial-econometrics.com.

Overview and General
Go to James P. LeSage's webpage...
Mathematical details of Bayesian spatial probit (MS Word)
Spatial probits and some sparse matrices programs


Other Econometrics and Statistics

Detailed notes on truncated and censored distributions, including double truncation and censoring, and allowing for parameterized heteroscedasticity.


Amazon and Brazilian Data and Tools

More to be added soon...

Original IPEA pdf file for minimum comparable areas for 1970 to 2000 for all Brazilian municipios
Original IPEA pdf file for minimum comparable areas for 1991 to 2000 for all Brazilian municipios
Excel file of parsed IPEA pdf file for minimum comparable areas for 1970 to 2000 for all Brazilian municipios. (If anyone notices difference from pdf file, the pdf file is correct. Please notify me of any errors discovered.)
Excel file of parsed IPEA pdf file for minimum comparable areas for 1991 to 2000 for all Brazilian municipios. (If anyone notices difference from pdf file, the pdf file is correct. Please notify me of any errors discovered.)
Stata file translating 1997 municipio codes for Brazilian Amazon into minimum comparable areas for 1994 to 2001; and 1997 to 2001.
Stata file translating 1997 municipio codes for Brazilian Amazon into minimum comparable areas for 1970 to 1997; 1991 to 1997; 1994 to 1997; 1991 to 2001; and 1994 to 2001.
Stata file translating 1994 municipio codes for Brazilian Amazon into minimum comparable areas for 1991 to 1994; 1991 to 1997; 1994 to 1997; and 1994 to 2001.
Stata file translating 1991 municipio codes for Brazilian Amazon into minimum comparable areas for 1991 to 1997; and 1991 to 1994.


Arc View Avenue scripts

Most of these Avenue scripts are based, sometimes almost completely, on scripts I downloaded from the ESRI website. I have kept the authors' names and contacts in the file headers when this is the case.

Go to ESRI's Avenue script webpage...
Generates an output file that lists neighbors to each polygon based on whether the polygons touch. It also comments on whether any 2 polygons overlaps, or whether one might be contained in the other one.
Identifies gaps between polygons and attempts repair
Identifies overlaps between polygons and attempts repair
Converts Arc Info GEN format to shapefile (handles donut polygons)
Converts shapefiles to Arc Info GEN files (handles donut polygons)
Computes lengths of polylines, places in dbf file, and joins with shapefile
Interpolates missing values of a field by averaging the non-missing values of geographic neighbors
Computes area for polygon file that is already projected
Computes area for polygon file in geographic projection (lat-long) by projecting it to one of 3 equal area projections
From a given theme, makes individual polygons from multipart polygons, and writes the entire file to a new shapefile
Creates a field which tells how many parts each polygon has.
Takes a point shapefile with x- and y-coordinates and field containing area, and converts to square or circle shapefile with centroids of the points and areas given by the field
Computes centroids for each polygon and creates a new point shapefile. If the centroid is external to the polygon, moves the centroid to the nearest point of the polygon.
Given a point shapefile, reads field values from geographically corresponding polygons in polygon shapefile
Given a grid, reads field values from geographically corresponding grids using the ArcView SAMPLE command
Reads field values from geographically corresponding values of grids using points from a point shapefile
Adds X and Y coordinates of features to Attribute Table
Converts a gridfile into a point shapefile
Converts a gridfile into a polygon shapefile of squares the same size as gridcells
Generates a farmgate price grid, given a friction grid and a pointfile containing market prices and locations. This program can be very slow, because it generates a price grid for every market, the computes the maximum price at each gridcell. Nevertheless, this is quite a powerful tool for realworld farmgate price calculations.
Merges several grids together
Computes minimum value at each gridcell given a collection of grids
Sums values at each gridcell given a collection of grids
For a user-specified field, checks to see if values are unique for each shape (row, observation)
Makes a new field, and numbers each shape consecutively, to create a unique id code
Converts a file with lat-long in seconds to a file with lat-long in decimal degrees.
Renames a field
Some polygon files erroneously have holes not cut out, but listed as separate polygons. This takes those polygons, and cuts the holes out.
Unions all polygons in a theme, making one big polygon
Geographically cuts all elements of one theme out of another theme.
Makes a rectangle twice the size of the bounding rectangle for the theme


Deforestation and Other Research

More to be added soon...

Chomitz, Kenneth M., Piet Buys, and Timothy S. Thomas. 2005. "Quantifying the Rural-Urban Gradient in Latin America and the Caribbean." World Bank Policy Research Working Paper 3634 (June). Washington: World Bank.
Chomitz, Kenneth M., Timothy S. Thomas, and Antonio Salazar Brandao. 2004. "Creating Markets for Habitat Conservation when Habitats Are Heterogeneous." World Bank Policy Research Working Paper 3429 (October). Washington: World Bank.
Revised paper with Ken Chomitz on Amazon deforestation, dated October 2001. Published as a World Bank Policy Research Working Paper (no. 2467) (6.5 MB pdf)
First paper with Ken Chomitz on Amazon deforestation, dated August 2000. Published on the PPG7 webpage as part of the debate (3.7 MB pdf)


Dissertation

Completed July 29, 2003

Dissertation on Roads and Amazon Deforestation (2.7 MB pdf)
Dissertation, text only (0.5 MB pdf)
Dissertation, figures 1 to 17 only (1.1 MB pdf)
Dissertation, figures 18 to 29 only (1.2 MB pdf)
Dissertation, figures 1 to 3 only, large (1.6 MB pdf)
Dissertation, figures 4 to 6 only, large (1.8 MB pdf)
Dissertation, figures 7 to 20 only, large (1.4 MB pdf)
Dissertation, figures 21 to 24 only, large (1.5 MB pdf)
Dissertation, figures 25 to 29 only, large (0.7 MB pdf)


Directory

Contact me by email

Tim's faith blog

Spatial econometrics

Other econometrics and statistics

Amazon and Brazilian data and tools

Arc View Avenue scripts

Deforestation papers

Dissertation

My Most Used Links

CNN

NY Times Op-Ed

Factiva News

Amazonia News

Google Search Engine

Amazon Books

Borders Books

Weatherbug for Westminster, MD

Weather Channel hourly for Westminster, MD

IMF/World Bank Joint Library

World Bank Research (incl working papers)

World Bank Website (External)

World Bank Intranet

All Africa News

Economist Magazine

Washington Post Op-Ed

Orioles (Baltimore Sun)

Ravens (Baltimore Sun)

Babelfish Translator

Deforestation, Brazil, and GIS

DETER monthly deforestation detection

INPE annual deforestation

CIFOR

CIFOR insightful reports

IMAZON

Radio

WTOP News (Washington)

WBAL News/Sports (Baltimore)

WBJC Classical (Baltimore)

WGMS Classical (Washington)

WGTS Christian Music (Washington)

WAVA Christian Music (Washington)