Skip to main content


Showing posts from November, 2010

Analyzing Stimulus Funds Data

A report from Brito & De Rugy at the Mercatus Center at GMU from earlier this year reports that (emphasis added):
"An OLS regression analysis controlling for the district representative’s political party, tenure in office, leadership position, membership on the appropriations committee, as well as for the district’s unemployment, mean income (i.e., the average income of a given wage earner in the district), and the percentage of employed persons working in the construction sector in 2008 finds that having a Republican representative decreases a district’s stimulus award by 24 percent.   This effect is statistically significant at the p < .001 level."It's an interesting and useful paper.  They've put a lot of effort into compiling some data on the federal stimulus outlays and some other political variables as well as even correcting & error-checking the data they got from other sources. I like that they have provided the actual Stata dataset that they compil…

Generating Random/Fake String Data in Stata

When posting to Statalist I usually try to provide an example of my question or answer using the in-built "auto.dta" dataset, the -input- command to manually create a dataset,  or by generating fake, random data using Stata functions.  To create fake, random numeric data, you can use any of the random number generators detailed in -help random_numbers- (such as runiform), but there is no random generator for alphabet characters (A-Z or a-z).  Sometimes it's useful to illustrate to Statalist or students in class how to manipulate the dataset if it includes some kind of string variable that you want to use to identify panels or illustrate how to -encode- variables, etc.  (or maybe you just want a random string generator because you lost your dice for playing Scattergories)-ralpha- generates random string characters for Stata.    In many cases, you could generate the numeric variable and -tostring- it, but if you need string (alpha) characters, this package presents an easy…

An Update to Dual

Previously I described an application/script that enabled you to open two or more Finder windows, stacked side-by-side, on Mac OSX (10.4 or later).  This update changes the proportion of the windows the the display of the files to something closer to Path Finder 5; that is, the finder window stacked on the left (Window 1 below) is set to "list view"; Finder Window 2 (right) is set to "column view."  Adjust the size of the Finder windows using the "hei"(height) and "wid"(width) properties.  The script will also "hide" all other open windows.
You can download the .app version of this file (below) and then drag it to the dock next to your icon for a convenient way to open and positioning multiple Finder windows. 
Here's the .script:
propertywid : 10 propertyhei : 40 setthestartup_diskto (path tostartup disk) tellapplication "Finder" closeeveryFinder window activate setvisibleof (everyprocesswhosevisibleistrueandfrontmostis