Computing‎ > ‎

Matlab code

I'm trying to provide new code on my blog. It may show up there before I get around to updating this page.

Code to adjust least-squares standard errors for spatial correlation and serial correlation in panel data. (The technique is GMM, as described by Conley 2008). Usage described here.

Code for map-related utilities (computing centroids, adjacency matrices, coarsening raster data, formatting global maps, population-weighting global raster data) [several functions require the Matlab mapping toolbox]

Code analyzing field/raster data that changes over time (projecting field data on arbitrary shapefiles, aggregating or extracting monthly data) [several functions require the Matlab mapping toolbox]

Code to move data back and forth between Stata and Matlab. Usage is describedhere.

Code for non-parametric regression for one or two independent variables (Nadaraya-Watson), described here.

Code to generate and analyze random networks (Poisson, Watts-Strogatz, generate overlapping stars, plotting, computing empirical connection density, clustering coeff.)

Code for some simple statistical procedures (smoothing, computing centiles, CDFs, plotting coefficients).

Code for miscellaneous utilities (most useful is reading netcdf data, [requires Mexnc])

Code may contain errors. Please let me know if you find one. I do not accept liability for any mistakes that may arise from usage of my code.