GithubHelp home page GithubHelp logo

vekteo / card_sorting_jspsych Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 4.0 5.11 MB

A short version of a card sorting task created with jsPsych.

License: MIT License

JavaScript 66.74% HTML 21.66% CSS 0.50% Jupyter Notebook 11.10%

card_sorting_jspsych's Introduction

Card sorting task created with jsPsych

Created by the MEMO Team of Lyon Neuroscience Research Center (CRNL) (PI: Dezso Nemeth)

A card sorting task created with the jsPsych library (de Leeuw, J. R., 2015), based on the Berg's Card Sorting Task (Fox et al., 2013).

Citation

If you use the script, please include this citation in your manuscript:

Vékony, T. (2022). Card Sorting Task created with jsPsych (Version 1.0.1) [Computer software]. https://doi.org/10.5281/zenodo.7093470

DOI

Structure of the task

In the task, four cards appear on the screen. Each card has a different color, number, and shape property. From left to right, the card properties are the following: 1 red triangle, 2 green stars, 3 yellow diamonds, and 4 blue circles.

Below the four cards, a fifth one appears on the screen. The task is to classify the fifth card to one of the upper cards. The sorting can be done based on the color, number, or shape property. The user can classify the new card by cliking on one of the four cards.

The correct answer depends on a rule (color, number, or shape). The rule is not known by the user. However, a feedback is given to the user after each click (Correct or Wrong).

The card sorting task. The user has to sort the fifth card (below).

64 new cards as presented to the user. The rule changes after 10 consecutive correct answers. The order of the rules are: color, shape, number, color, shape, number.

Output variables

  • success: whether fullscreen mode was successfully started/ended (true or false)
  • browser_events: browser events during the task (fullscreenenter, fullscreenexit, blur, or focus)
  • view_history: viewing history during the instruction trials
  • rt: the reaction time of the sort
  • trial_type: JSPSych trialtype of the given trial (fullscreen, instructions or html-button-response)
  • trial_index: the number of the given trials (all events considered, even instructions, feedbacks!)
  • time_elapsed: the time elapsed from the start of the program in ms
  • internal_code_id: internal node id of the trial
  • subject: A 15-character long random subject ID for the online version, and customized subject number for the offline version
  • session: customized session number (for offline version only)
  • rt: the reaction time of the sort
  • test_part: part of the task (instruction, card, feedback, end)
  • stimulus: stimulus on the screen in HTML
  • button_press: the number of the card clicked (0-3; or null for feedback trials)
  • is_trial: whether the given trial is a sorting trial (sorting: true; feedback: false)
  • card_number: the number of the card presented (1-64)
  • correct: whether the card was sorted correctly (true or false)
  • image: the file path of the presented card
  • color: the color of the presented card
  • shape: the shape of the presented card
  • number: the number of the presented card
  • color_rule: the number of the correct card if the color rule is applied (0-3)
  • shape_rule: the number of the correct card if the shape rule is applied (0-3)
  • number_rule: the number of the correct card if the number rule is applied (0-3)
  • correct_in_row: how many cards were sorted correctly including this card (if answer is wrong, 0; is answer is correct, 1-10)
  • correct_card: the number of the correct card according to the rule currently applied
  • number_of_rule: the number of the rule applied (augments after each 10 consecutive correct answers, 1-6)
  • category_completed: the number of the completed categories (0-6)
  • perseverative_error: whether the answer was a perseverative error, i.e., where the user used the same rule as for the previous choice (yes: 1, no: 0)
  • non_perseverative_error: incorrect responses which are not perseverative (yes: 1, no: 0)
  • total_errors: the cumulative number of errors (1-64)
  • failure_to_maintain: whether the incorrect response occured after at least 5 consecutive correct answers, but before the category is completed (the errors at category changes are not counted) (yes: 1, no: 0)
  • applied_rule: the rule the user used (C - color, S - shape, N - number) - multiple letters when multiple applied rules are possible
  • perseverative_response: incorrect response that would have been correct for the previous category (yes: 1, no: 0)
  • conceptual_level_response: correct response that occured in a run of three or more (yes: 1, no: 0)
  • key_press: JS code of key pressed

In the columns start with STAT, basic statistics are calculated:

  • STAT_nr_of_trials: number of trials (normally 64)
  • STAT_p_of_correct_trials: percentage of correct trials
  • STAT_nr_of_perseverative_responses: number of perseverative responses
  • STAT_nr_of_perseverative_errors: number of perseverative errors
  • STAT_nr_of_non_perseverative_errors: number of non-perseverative errors
  • STAT_p_perseverative_errors: percentage of perseverative errors (% of the the total number of trials)
  • STAT_nr_of_total_errors: total number of errors
  • STAT_p_of_errors: percentage of errors (% of the total number of trials)
  • STAT_category_achieved: the number of categories successfully completed (0-6)
  • STAT_p_of_conceptual_level_responses: the percentage of conceptual level responses (% of the total number of trials)
  • STAT_failure_to_maintain_set: the number of times five or more consecutive correct responses occur without completing the category (do not reach 10 consecutibe correct)
  • STAT_trials_to_complete_first_category: the number of trials needed to achieve the first 10 consecutive correct responses

Setting options

The language of the task can be set in the parameters.js file by modifying the variable "language".
Available languages: english (en), hungarian (hu), french (fr), portuguese (pt)

How to start the task

Open the index.html file in either the offline or online folder. When the offline version is started, you can customize the subject and session numbers (any number is accepted). If you start the offline version, a random subject ID will be allocated.

Browser requirements

Any browser except Safari and Internet Explorer.

card_sorting_jspsych's People

Contributors

vekteo avatar

Stargazers

Denis Cousineau avatar Pablo Bernabeu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.