Skip to content

About

Task for Comutational Mechanisms of Attribute Translations

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

193 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Computational modeling reveals dissociable mechanisms of attribute translations - Task

This repository contains the code for the task of the project "Computational modeling reveals dissociable mechanisms of attribute translations" (Study 2). The results are published in the article: TBA. Authors are Barbara Oberbauer, Ulf J.J. Hahnel, Sebastian Gluth.

The osf-project and preregistration can be found here: https://doi.org/10.17605/OSF.IO/Z2C5E.

Up until publication, this repository will be frequently updated.


Content of Repository

This repository contains the php scripts for running the task. This task may either be run on a remote server or be hosted locally. See the MouselabWEB documentation or below for instructions on how to host it locally.


Setup Experiment

Participants are recruited through prolific and their prolific id is added to the experiment URL. In index.php, participants' id $subject is set to either their prolific id or - in case no prolific id can be found in the URL - to 'anonymous'.

In session 2, participants are assigned to one of three groups. The group they are assigned to is coded in $condnum. The control group (condnum = 1 ) will see the attributes price, consumption, and popularity in both sessions. The replacement group (condnum = 2) will see an attribute translation in Session 2 that replaces the original attribute energy and water consumption. The addition group (condnum = 3) will see an attribute translation in Session 2 that is presented in addition to the original attriubte energy and water consumption.

Half of the participants in the replacement and addition group, respectively, will receive a rating as attribute translation (condvar == 'rating') and the other half will see carbon emissions as attribute translation (condvar == 'emission').


Prerequisites

The experiment requires a webserver (local or remote) with php and a MySQL database.

Install XAMPP

  • for a local webserver, install XAMPP and start Apache and MySQL
  • place this folder inside the localhost folder of XAMPP, for example under Windows it could be: C:\Program Files\xampp\htdocs\
  • open the application in the browser, under eg.: http://localhost/this_folder/
  • the file index.php is opened automatically

Create a database

Prior to running the experiment for the first, you will need to create a database.

  1. Go to http://localhost/phpmyadmin and create a database; name it MouselabWEB for example.
  2. Open mlwebdb.inc.php in a text editor and make the necessary adaptations. This file contains the database information and is used by all other php-files to access the database. For example, the save.php script uses it, but the datalyser also uses it. In most cases, xampp default settings do not password-protect the database, which might be a security issue on your local network. Adapt the following values:
$DBuser = "root";  
$DBpass = "";  
$DBName = "MouselabWEB";  
$table = "mlweb"; // assigns a name to the data table within the database
  1. Run create_table.php on the server to create a table in the database based on the settings in mlwebdb.inc.php. This would, for example, be http://localhost/this_folder/create_table.php. This script creates a table named in line: $table = "mlweb";. You can create tables with different names within the same database for different sets of experiments (which would have different subfolders, each with their own mlwebdb.inc.php).
  2. Once the table is created you are set. Any php file you generate can be copied to the current experiment folder and will automatically save the data into the database in the table you just created.

Online prerequisites

  • set database values and passwords accordingly
  • change Datalyser password to ensure data protection
  • a webserver with access to run PHP scripts
  • a mysql-database with password in which you can create the mlweb table (using the create_table.php script).
  • a subdirectory called tmp with read/write access for all users. You might have to set these priorities yourself using an FTP program (chmod 777 on the tmp folder). This is needed for the datalyser.

Corresponding Author

Barbara Oberbauer, barbara.oberbauer@uni-hamburg.de

DOI

About

Task for Comutational Mechanisms of Attribute Translations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages