Skip to main content


Showing posts from May, 2011

Unabbreviate Macro Lists in Stata

This Statalist thread from a few months ago started by Nick Mosely asked about working with hundreds of macros and eventually got onto the topic of expanding or unabbreviating (see -help unab- for the varlist version of this idea) macro lists.  Based on my posts in that thread, I recently posted -mac_unab- to the SSC Archives to help with this problem. -mac_unab- is still a bit of a kludge solution, but I haven't figured out a better approach ( nor did anyone suggest a better approach ).  The biggest issues with mac_unab, which I hope to find better solutions for, include: 1.  When you run mac_unab, it will print all the contents of the -macro list- command in the Results window.  This might be desirable for some, but I'd like to be able to toggle it on/off.  Currently, the way I've gathered the macros is via a log, so there's no way to avoid printing the -mac list- output each time -mac_unab- is run. 2.  Currently, the program will only match macros with the patt

For Computers, understanding natural language is sometimes hard ...

T his paper  by Chloe ́ Kiddon and Yuriy Brun at U of Washington describes a bayes classifier that can be used to find accidental double entendres or "potential innuendos" (called "That's what she said" or TWSS jokes) in sentences.  Here's the ruby script to run this classifier to identify so-called "low brow comedy" (their words, not mine) in natural, human language . Hopefully, this foreshadows the great things we can expect from our computers' auto-complete functionality in the near future. This article from Wired on detecting humor with computer software is also relevant.  Andrew Gelman,  a bayesian scholar and co-author of the great zombie survey paper ^, links to this article  in his blog  after I recently mentioned it to him. ___ ^ This paper contains a Technical Note, describing the authors' rationale for using LaTeX, that is one of my all-time favorite quotes:  " We originally wrote this article in Word, but then we