Archives for the ‘Stata’ Category

Define local macros in one place, use them everywhere

In The Stata Journal Vol. 9, No. 3, 2009 there's a Stata tip (# 77) on re-using macros in multiple do-files, by Jeph Herrin. His solution is to define any local macros in a separate do-file, say locals.do. You can call that do-file with the include command at the top of any do-file that might [...]

Back issues of the Stata Journal

I have this Twitter search saved in my Google Reader. It works OK. One recent tweet by DismalTrader linked to an old Stata Journal article about demand estimation, saved on Scribd. This reminded me that The Stata Journal has a three-year moving wall: anything older than three years prior to the latest issue is available free, [...]

Parenting with Stata

My daughter will be eight days old by the time I'm done writing this. She's on food intake and diaper watch, so among the things we brought home from the hospital was this pink sheet where we were supposed to record full diapers and feeding patterns. Of course we then filled it out, and when [...]

Real FAQ’s

This list at the UNC help desk looks like it really was compiled from questions actually asked. That's always a good thing, so here goes. I hope you find it useful.

Regex tricks with Notepad++ and Statalist

If you haven't heard, the do-file editor in Stata 11 comes with proper syntax highlighting, folding, etc. That means that this post will be obsolete as soon as I upgrade, unless the new do-file editor doesn't do regular expression-based find and replace. No matter. In the meantime, here goes: People often post code on Statalist [...]

Numerics by Stata

Two years ago, three economists at the World Bank -- Michael Lokshin, Zurab Sajaia and Sergiy Radyakin -- cooked up ADePT. That, to my knowledge, was the first successful attempt to use Stata for leveraging econometric research across the world. Think of it this way: a star academic economist builds a theoretical model that explains [...]

My first useful Mata function

Or so I thought. I'm working on a cluster analysis project. There are multiple data sets, they are massive, and there are several variable subsets by which one could plausibly cluster the observations. Agglomerative hierarchical clustering is the way to go when you don't have any notion of how many clusters there should be, but [...]

It’s grim back home

Ever since I moved to the US in 1996, I've been reading one Romanian daily newspaper or another, with titles changing as their web presence waxed and waned and as my own preferences shifted over time. As it happens, a significant part of my livelihood has come lately from helping some eighty-odd American daily newspapers [...]

Learning and mingling opportunities

If you've got £900 to spare and an inclination to spend a lovely September week at the London School of Tropical Medicine, lucky you. I'd appreciate a first-hand account if you go. StataCorp does what it can, but I'm sure the more the merrier. My own first attempt at contributing happened this May, when I [...]

Stata 11 shipping July 27

Of course if you are on the Statalist you already know. Details here. New features include a proper editor with syntax highlighting, full pdf documentation, support for interaction terms typed directly in your estimation expression -- the lack of which used to be a reason to prefer R -- and a full kit of object-oriented [...]