Tutorial

::

Linguistic Experiments with WebExp2

 
[Overview Local setup WE2 Support Design Issues Creating WE2 Experiments Advertising Results & Analysis]
 

Setting up your Stanford WE2 account

There are three steps involved in setting up your own WebExp2 account:

  1. Getting an account
  2. Creating a couple of directories
  3. Having those directories linked to the WebExp2 server

[TOP]

Getting an account

The local WE2 server is running on symsys.stanford.edu. In order to run experiments using this server, you must have a symsys account. You can get such an account by emailing to action@csli.stanford.edu. You also have to cc two more people: whoever is in charge of the WE2 server (currently this is Florian) and whoever is in charge of the webserver on symsys (currently this is Ian Ward Comfort). They will need two pieces of information from you:

  • your sunet ID (not your password; just the account name). State clearly that you want a WebExp2 account on symsys to conduct experiments. Your sunet ID will also be your experimenter ID for the WE2 server. Remember that.
  • your name. This is the name that will be associated with your WE2 server account.

Also tell them that you need your public html directory (WWW) to be mapped to http://symsys.stanford.edu:8081/experiment/YOUR-SUNET-ID/ (this is only necessary of you want your html pages to be located on symsys as well; if you want only the experimental data on symsys (with all the html pages on some other account), then you don't need a public html directory on symsys).

Once your account has been set up, log in and change your password. NB: Symsys currently does not accept connections from outside of the Stanford network. If you're outside of Stanford's network, log into any of the campus machines first (e.g. Elaine, Vine, Firebird, Cardinal, etc.). From there you can log into symsys using ssh:

    ssh YOUR-SUNET-ID@symsys.stanford.edu

The first time you log in, you may be asked whether you want to add the host ID to your trusted IPs. Answer "Yes". You can transport files from symsys or to symsys by using sftp to any of the campus machines or by mounting symsys to AFS:

    klog -t YOUR-SUNET-ID
You will be asked for your AFS password. You can also add this command to your .login file in your symsys account (in that case you will be asked first for your symsys password and then for your AFS password when you log into symsys). After that you can copy between your AFS account (your normal Stanford account) and your symsys account using the normal copy command cp. You can get more information on how to use it by entering man cp. For example, I could copy my CV from my AFS public html directory into my symsys account:
    cp /afs/ir/users/t/i/tiflo/WWW/schmack.html ~

[TOP]

Creating directories

In order to run WE2 experiments you need two directories in your WE2 account. One directory will contain all the html pages (with instructions, consent forms, etc., as well as the applet that your subjects will use to communicate with the WE2 server). If you want your html pages to be located outside of symsys, you don't have to bother about this directory. This directory may already exist (it should be called WWW). You can test at any time whether your WWW directory is served to the web by putting a file into it (let's call it FILENAME.html) and then pointing your browser to http://symsys.stanford.edu:8081/experiment/WE2/YOUR-SUNET-ID/FILENAME.html. The second directory is a must. It should be located (directly) under your symsys account and it should be named WE2data. Here is how you create these two directories and set the right permissions.

    mkdir ~/WWW
    mkdir ~/WE2data
    chmod a+rx ~/WWW
    chmod ug+rx ~/WE2data

The WE2data directory must be writable for the WE2 server (this is necessary since this is the directory to which the WE2 server writes the results of your experiments. For that you need to set some permissions:

    chgrp -R we2 ~/WE2data/
    chmod -R g+rwx ~/WE2data/

Next you should copy some files from the WE2 server that will allow you learn and play with WE2:

    cp -r ~fjaeger/WWW/WE2/data/default/* ~/WE2data/

This should copy example experiments into your directory. If you look at the list of those files, it should be something like the following (this may change in the future):

    ls ~/WE2data/
    attractiveness demotest experiments.xml layouttest magest stroop template

You will have to make sure for all future directories that you create in this directory that they also have the right permissions. Whenever you will create a new directory (which is necessary as part of creating a new experiment), you will have to repeat the commands given above.

[TOP]

Make sure that all directories are readable and writable to the group we2. Repeat the command from above:

    chgrp -R we2 ~/WE2data/
    chmod -R g+rwx ~/WE2data/

Linking directories to the WE2 server

Almost finished. You need to inform the person responsible for the WE2 server to add your account to the server. For that, the WE2 server will need to be reset and it's possible that this will be done overnight (while fewer people are likely to take experiments). Once (1) your WE2data directory has been linked to the WE2 server, (2) your name has been added to the list of experimenters, and (3) the WE2 server has been reset, then you can start working on your experiments. Note that every time you add an experiment, the WE2 server may have to be reset before any changes actually take place. Changes in the stimuli files of an existing experiment do not require a WE2 server reset.

Testing your WE2 account

After your account has been linked to the WE2, any of the default experiments should work. So let's give it a try. First let's copy an example html page with an experiment into your public html directory. Then let's open it in emacs and edit it:

    cp ~fjaeger/WWW/WE2/demotest.html ~/WWW/
    emacs ~/WWW/demotest.html

We have to modify the following lines to make the embedded experimental applet point to your experiment:

    <APPLET code="client.ExperimentClient.class" width=700 height=550 align="top" archive="webexp2.jar">

should be changed to also contain the information given below in blue:

    <APPLET codebase="http://symsys.stanford.edu:8081/experiment/WE2/" code="client.ExperimentClient.class" width=700 height=550 align="top" archive="webexp2.jar">
Similarly, the following parameters should be changed to contain the new values given in blue (if that isn't already the case):
    <PARAM name="experimenter" value="YOUR-SUNET-ID">
    <PARAM name="experiment" value="demotest">
    <PARAM name="port" value="6785">
    <PARAM name="LANG" value="UTF-8">

All of your experiments will be called through such websites with (almost) the same parameters. The only difference between the websites for each experiment will be the "experiment" parameter, which tells the server which of your experiments you want the user to be referred to. We will get back to this later.

Now if you point your browser to http://symsys.stanford.edu:8081/experiment/YOUR-SUNET-ID/demotest.html, you should see a WE2 demo experiment. Try and go through it. The results will be written to your WE2data/demotest/results/ directory. Subject identification information is stored separately under your WE2data/demotest/subjects/ directory. Have a look (but first finishe the experiment). You can run similar tests for the other sample experiments that you copied into your WE2data directory by editing/creating according html files in your WWW directory.

NB: After you're done learning from the sample experiments, please consider deleting them (you can always get them again), since they will unnecessarily increase the work load for the WE2 server. All demos are available at the WE2 info page or locally on symsys at e.g. http://symsys.stanford.edu:8081/experiment/WE2/demotest.html.

The next part of this tutorial contains information on WE2 support and links to both the user manual and the email archives with frequently asked questions.

[TOP]

 
[Overview Local setup WE2 Support Design Issues Creating WE2 Experiments Advertising Results & Analysis]