VBA code for creating factorial combinations

In certain situations, such as systematically generating computer code for analyzing data, it is necessary to create a combination of a variety of factors. Creating factorial combinations is easy when there are only a few factors and levels, but in more complicated situations the task is tedious and prone to error. This Excel file uses VBA to create full-factor combinations with up to 15 factors, each with up to 100 levels. An optional delimiter (such as ” AND “) can be inserted between each level in the combination.
Continue reading “VBA code for creating factorial combinations”

Ruby, JavaScript, and Perl code for using Mechanical Turk’s APIs

The Ruby, JavaScript, and Perl files I have posted below may be useful to someone who wants to access MTurk’s APIs to create HITs.  Basic tasks (e.g., creating a HIT) and intermediate tasks (giving a “bonus” to a worker) can be accomplished easily by using Amazon’s web interface.  Advanced tasks (e.g., sending e-mail notifications to a long list of workers who have completed your previous HITs) cannot be accomplished with the web interface.  There is a striking contrast between the ease of doing tasks with the web interface and the difficulty of doing tasks with the API.  That difference is akin to the difference between buying a car and building a car entirely from custom parts.  Continue reading “Ruby, JavaScript, and Perl code for using Mechanical Turk’s APIs”

Generating Footnotes in Bluebook Format for Law Review Manuscripts

When writing for a law review, I like to submit a manuscript with reasonably polished footnotes. I’ll probably never get the footnotes 100% accurate; there are too many “dusty corners” in the bluebook citation system for that. But I try to get the basics correct. To help me do that, I’ve created an online tool for generating footnotes in Bluebook format.
Continue reading “Generating Footnotes in Bluebook Format for Law Review Manuscripts”

VBA code for creating text files based on data fields

I needed to create a lot of text files that were similar to one another except they were altered depending on a simple database. It would be something like an old-school MS Word “mail merge,” except it would create separate text files. I wanted an easy-to-use tool, so I put together something in Excel using VBA. The tool could create thousands of text files that vary on (up to) 15 different fields (i.e., dimensions). For example, this tool could create many HTML files that are all alike except for a product description, a photo, and a URL link. My original purpose for creating the tool was to setup the coarse-grained parallelization of a CPU-intensive Monte Carlo simulation.
Continue reading “VBA code for creating text files based on data fields”

MBA 655 — Consumer Behavior — Class Topics

MBA 655 (Consumer Behavior) is about managerial application of the principles of consumer behavior, with an emphasis on consumer psychology. For firms that sell products and services that are purchased by consumers, the ultimate determinant of sales and profitability is consumer behavior. Managers are most successful when they can successfully predict the behavioral responses of consumers to the managerial actions under consideration. For example, will consumers like the new product we’re developing? How would consumers react to a decrease in price if it is accompanied by a decrease in product quality? How will consumers respond to the firm’s advertisements? Without an understanding of why consumers behave as they do, managers are left to simply guess at the answers to such questions.
Continue reading “MBA 655 — Consumer Behavior — Class Topics”