Qualtrics allows JavaScript in the survey questions. However, when reading and writing embedded data based on survey responses using JavaScript, the syntax is a little weird. This post walks through an example of using JavaScript to …
(1) read embedded data (strings and numbers)
(2) accept survey responses, and
(3) change the embedded data based on the survey responses (i.e., conditional processing).
Continue reading “In Qualtrics, using JavaScript with embedded data and survey responses”
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”
Stata code for performing the Preacher and Hayes bootstrapped test of mediation
The well-known Preacher and Hayes macros for performing a bootstrapped test of mediation are designed to work only with SPSS or SAS. Those statistics packages are fine, but I prefer Stata. In this post, I provide Stata code for performing the Preacher and Hayes test. Continue reading “Stata code for performing the Preacher and Hayes bootstrapped test of mediation”
2 x 2 Chart Template
This Excel file is a template for creating a chart of the four cell means from a 2 x 2 full-factorial experiment. The output (on the worksheet titled “the Figure”) is a chart that is ready for inclusion in a manuscript.
Continue reading “2 x 2 Chart Template”
Adding a process tracing (i.e., information board or decision board) method to Qualtrics
This project integrates a process tracing methodology (variously called an “information board,” “decision board,” and other terms) with Qualtrics. I couldn’t find an acceptable way to create one within Qualtrics itself, so I created this project. Continue reading “Adding a process tracing (i.e., information board or decision board) method to Qualtrics”
Restoring Qualtrics’ “edit multiple” method
This post describes a way to restore Qualtrics’ “edit multiple” option.
Continue reading “Restoring Qualtrics’ “edit multiple” method”
Some Advanced Westlaw search formats
Westlaw is a powerful tool for searching case law, the scholarly legal literature (“secondary sources”), and more. The basic search tools provided by Westlaw are reasonably good. But, as described below, the tools can be combined together to yield more advanced searches.
Continue reading “Some Advanced Westlaw search formats”
JavaScript for Customized Qualtrics Questions
Years ago, I wrote my online questionnaires from scratch with client-side JavaScript and Perl. Nowadays, I’ve moved almost entirely to Qualtrics. Creating and managing online questionnaires with Qualtrics is so easy that I’ve been spoiled by it.
However, I had a task I couldn’t accomplish with the typical question types, so I wrote a JavaScript solution for customizing Qualtrics questions. I’m posting the solution here in case it’s useful to other people. This mock-up questionnaire is an example of the sort of customized questions that could be created. The basic approach I describe below is straightforward, so you could adapt my JavaScript code to your favorite web programming language. Continue reading “JavaScript for Customized Qualtrics Questions”