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”

SPSS code for calculating the confidence interval of a Pearson correlation

For some reason, SPSS does not offer an option to calculate the confidence interval of an observed value of a Pearson correlation. SAS does it, and so does Stata. But SPSS doesn’t do it. Of course, SPSS will calculate the correlation itself. However, it will not calculate the confidence interval of the correlation.

The SPSS syntax below calculates the confidence interval.  I’ve drawn on some code from the SPSS website; I’ve made the code easier to use and the results easier to interpret. I have verified the calculations against what I get using Stata, and the syntax calculates the confidence intervals correctly.
Continue reading “SPSS code for calculating the confidence interval of a Pearson correlation”