Internet Research Methods in Psychology


Internet Research Methods in Psychology
Seminar - PSYC 593 CF
CRN: 48584

Instructor

R. Chris Fraley, PhD
Department of Psychology, Room 429
E-mail, phone, and other information: http://www.psych.uiuc.edu/~rcfraley



Class web page

http://www.web-research-design.net/P593/

Updates

Jan 17, 2008

Updates will be posted here throughout the semester.
Readings

There is one book for this class:

Fraley, R. C. (2004). How to conduct behavioral research over the Internet: A beginner's guide to HTML and CGI/Perl. New York: Guilford.

It is not available at the Univ. bookstore, so you'll need to order a copy on-line. You can obtain copies at Amazon.com or the Guilford Press.

Overview of the Course

During the past few years, an increasing number of psychologists have begun to use the Internet as a tool for conducting psychological research. It is easy to understand the appeal of using the Web for research purposes. Just about any study that can be conducted via traditional pencil-and-paper methods can be implemented on-line, but without the hassles of data entry by hand, the scheduling of participants, and paper costs. Moreover, researchers who use computers in their experiments for manipulating visual or narrative stimuli, randomizing trials, or creating customized assessments can easily implement their protocols on-line. Most importantly, although researchers can use the Web simply as an efficient way to collect data from undergraduates in their departmental subject pools, the Web allows us to open our laboratory doors to people from across the world.

My objective in this class is to teach you how to create web programs so that you can use the Internet as a medium for conducting psychological research. We will focus on CGI programming in Perl. CGI programs are designed to run on a web server, and, unlike standard HTML web pages, these programs can be used to create a dynamic, interactive web experience for the user. By using CGI programs, researchers can (a) randomize the presentation order of stimuli, (b) randomly assign subjects to conditions, (c) automatically save response data to a file for data analysis, (d) provide subjects with customized feedback based on their responses, (e) exploit both text and image-based stimuli, (f) measure reaction times, and (e) employ complex branching operations within a project.

Throughout the semester we will work our way through these and other topics, beginning with the basics (e.g., how to create a simple web page using HTML) and progressing through the more complex topics (e.g., how to write CGI/Perl scripts that create customized feedback to subjects). We will also discuss some conceptual and practical issues, such as those concerning ethics, sampling, data security, the quality of Internet data, and how to submit IRB's for web-based research.

This class is intended for anyone who currently conducts research in the psychological sciences. The seminar is designed to be a practical one and, as such, will be of most use to students who actually want to use the Internet to collect data.

The Class Webpage

I will post lecture notes and other materials relevant to the class on the class web page. You should treat the class web page as your primary syllabus. I will be updating it on a regular basis and it will be your responsibility to keep up-to-date on any changes that are made. (I will, however, announce significant changes in the lecture sessions.)

Workload, Grading, and Expectations

We will work through one chapter of the book a week. I will introduce the basic concepts to you in class and walk you through some examples. After that introduction, however, I expect you to read the chapter and work through the examples discussed therein. You probably need to set aside 6 hours a week outside of class for reading and practicing your programming skills.

You will be given mini-projects throughout the semester as a way of keeping you on track and helping you evaluate your strengths and weaknesses. From a grading perspective, one of the nice things about web design is that a program either works or it does not and, more importantly, it is quite clear when the program is working well. As such, these projects will be graded on a pass/fail basis.

Beyond the homeworks, you will have one mega project for the class. Specifically, I will ask you to create a sophisticated web study from the ground up. This study will be one of your choosing and, as such, it should be one that fits naturally into your research program. For this project you will write and submit an IRB, do the programming, and begin collecting the data. I realize that some people have more lofty ambitions than others, so I will work with you early in the semester to ensure that your project is manageable (if it originally seems too complex) or more complex (if it originally seemed too rudimentary).

If you do not have some sense of what you would like to do for your final project by the end of the first week, this is not the class for you. I say this because there is limited space in the class and I want to make sure that those taking it are the ones most likely to benefit from it.

Policy on Missed Tests and Assignments

Homework assignments should be turned in via e-mail by the beginning of each class. Your e-mail should indicate the due date of the assignment, link to the relevant web pages, and attached copies of any code you wrote. If you turn in more than 2 assignments late, I will automatically assign failing grades to those assignments.

Student Homework Links

Kisha Jones
Silke Holub
Jenn Klafehn
Chris Nye
Melissa Milanak
Yung-jui Yang
Sang Woo
Jennifer V. Fayard
Steve Broomell
J. Oliver Siy
Rong Su
Nathan Todd
Mike Morrison
Jennifer Rosner



Schedule for the Class

I will be constructing my lectures over the course of the semester. As the lectures and plans become more crystallized, I'll post the necessary materials on the class web page. The outline below is a preliminary outline (i.e., one that is subject to change) of what will be covered during the lab sections of the class.

Date Topic Files or links
Jan 18 Introduction: What can be done over the Internet. Creating a web server account. Lecture notes 1 - Internet Possibilites [PowerPoint]

Lecture notes 2 - Setting up a web server via Netfirms [PowerPoint]

Some useful links for EditPlus and Netfirms
Jan 25 How to make a basic HTML web page

Useful links to HTML sources
HTML colors and references
CSS tutorials and references
HTML table tutorial
HTML Tags and attributes
Lecture notes 3 - Creating HTML web pages [PowerPoint]

Details on homework assignment [create a web page]

Feb 1 HTML forms: Collecting research data from participants
From this point forward, PowerPoint lecture files won't be of much good to us. Today we will discuss the use of HTML forms. We will focus on the code for the following form, http://www.web-research-design.net/P593/form1.htm. To view the HTML code, right-click on it and choose the view source option.

We will also begin a rudimentary discussion of CGI. The code for the form1.pl script we will use can be copied and pasted from here, http://www.web-research-design.net/P593/form1pl.txt.

Details on homework assignment [create a web page questionnaire with Perl script]

Feb 8 An introduction to CGI scripting: Using Perl to save automatically response data to a file AND Providing customized feedback to research participants

Here are some files we'll be using today:

form3.htm
form4.htm
notest
form2.pl [text file version]
form3.pl [text file version]

Details on homework assignment [create a Perl script that processes data]

Feb 15 Using Perl to deliver HTML, connecting multiple web pages, for-next loops and arrays

foreach meets CSS in tables
form4.htm
form4.pl [text file version]

Administer questionnaire items via perl
form5.pl
form5.pl [text file version]

Script that processes form5.pl's data
form6.pl [text file version]

Do it all (administer items and process data) with 1 script
form7.pl
form7.pl [text file version]

Present items on separate pages - hidden tags
form8.pl
form8.pl [text file version]

The basics of a for loop
form9.pl
form9.pl [text file version]

Using the for loop to access elements of an array
form10.pl
form10.pl [text file version]

Using the for loop with arrays to present questionnaire items
form11.pl
form11.pl [text file version]

Feb 2 Using Perl to deliver HTML, connecting multiple web pages, for-next loops and arrays

In class exercise on arrays
arrayexercises.txt


foreach meets CSS in tables
form4.htm
form4.pl [text file version]

Administer questionnaire items via perl
form5.pl
form5.pl [text file version]

Script that processes form5.pl's data
form6.pl [text file version]

Do it all (administer items and process data) with 1 script
form7.pl
form7.pl [text file version]

Present items on separate pages - hidden tags
form8.pl
form8.pl [text file version]

The basics of a for loop
form9.pl
form9.pl [text file version]

Using the for loop to access elements of an array
form10.pl
form10.pl [text file version]

Using the for loop with arrays to present questionnaire items
form11.pl
form11.pl [text file version]

Feb 29 Multipages

Hidden tags and multi-page layouts
mult1.pl
mult1.pl [text file version]

Mar 14 Subroutines

Basic subtroutine
sub1.pl
sub1.pl [text file version]

Basic subtroutine with parameters
sub2.pl
sub2.pl [text file version]

Subtroutine: parameters, indexing, returning values
sub3.pl
sub3.pl [text file version]

Subtroutine: Additional examples
sub4.pl
sub4.pl [text file version]

Homework March 14 2008

Create a set of subroutines that will automate some processes that are commonly used in Internet based research applications. Also, illustrate the subroutines' use in a perl script application. Please focus on any two of the following:

1. A routine that automatically creates the radio buttons for items that require 1 to 5 rating scales.

2. A routine the passes all data from one page to the next via hidden tags.

3. A routine that automatically opens the data file and computes correlations between two variables.

Mar 14 Random assignment to conditions and randomizing the order of stimuli

Randomize a list
rand1.pl
rand1.pl [text file version]

Randomly select 1 item from a list
rand2.pl
rand2.pl [text file version]

Toss a coin: Heads or tails?
rand3.pl
rand3.pl [text file version]

Random assignment to conditions
rand4.pl
rand4.pl [text file version]

Random assignment to conditions - 2 x 2 design
rand5.pl
rand5.pl [text file version]

Randomize order in which questions or stimuli appear
rand6.pl
rand6.pl [text file version]

Randomize question order while presenting questions across multiple pages
rand7.pl
rand7.pl [text file version]

Randomize both the order of questionnaires/blocks and items/stimuli within a questionnaire/block
rand8.pl
rand8.pl [text file version]



April 11 Tracking participants over multiple sessions: Usernames, passwords, and menus

Before we get started, go to your Netfirms account and create a new folder within your www directory called 'data'.

The scripts for this week are listed as separate text files, but they all function together. To see them in action, visit this link: Login page example.

Individual files for copying and pasting:
login.htm [right click on page to view source]
createuser.pl [text file]
createpassword.pl [text file]
menu.pl [text file]
loginsurvey.pl [text file]

Details on homework assignment: homework7.txt
April 18 Graphical displays of data using HTML/CGI tricks

Individual files for copying and pasting:
Interface for demonstrating bargraphs
graphdemobar.pl
graphdemobar.pl [text file]

Image files used for the bargraph
bargray.jpg
barblack.jpg
[right-click these and save them to your computer. The script calls them from an /images/ directory in www, so, if you transfer them to your server, create an images folder and place them there]

The actual code for creating a simple bargraph
graphbar.pl [text file]