Demography
**********


General
=======


BasicDemography
---------------

class psynet.demography.general.BasicDemography(label='basic_demography')

   Bases: "Module"

   Asks for gender, age, country of birth, country of residence, and
   formal education.


Age
---

class psynet.demography.general.Age(label='age')

   Bases: "ModularPage"

   Numeric age question accepting integers from 1 to 119; saves the
   answer as "participant.var.<label>".


Gender
------

class psynet.demography.general.Gender(label='gender')

   Bases: "ModularPage"

   Radio-button question on gender identity, with a free-text option;
   saves the answer as "participant.var.<label>".


BasicMusic
----------

class psynet.demography.general.BasicMusic(label='basic_music')

   Bases: "Module"

   Asks for years of formal music training, daily listening hours, and
   whether the participant earns money from music.


Dance
-----

class psynet.demography.general.Dance(label='dance')

   Bases: "Module"

   Asks whether the participant dances socially or professionally and,
   if so, when they last danced.


ExperimentFeedback
------------------

class psynet.demography.general.ExperimentFeedback(label='feedback')

   Bases: "Module"

   Asks whether the participant liked the experiment, found it
   difficult, and hit technical problems.


HearingLoss
-----------

class psynet.demography.general.HearingLoss(label='hearing_loss')

   Bases: "ModularPage"


Income
------

class psynet.demography.general.Income(label='income')

   Bases: "Module"

   Asks for yearly household income.


Language
--------

class psynet.demography.general.Language(label='language')

   Bases: "Module"

   Asks for the mother tongue and, if the participant speaks several
   languages, ranks them by proficiency.


MotherTongues
-------------

class psynet.demography.general.MotherTongues(label=None, prompt=None, control=None, time_estimate=5, save_answer=None)

   Bases: "LanguageList"

   A free-text response page for participants to input multiple
   languages they speak as mother tongues.


   Inherits from
   ~~~~~~~~~~~~~

   LanguageList

   default_label

      The default label for this page. May be overwritten with a label
      parameter when called.

      Type:
         str

   default_prompt

      The default prompt instructing participants to list all
      languages they speak as mother tongues. May be overwritten with
      a prompt parameter when called.

      Type:
         str or callable

   default_control

      The default control used for user input (free-text). May be
      overwritten with a Control parameter when called (unlikely to be
      needed).

      Type:
         Control


LanguagesInOrderOfProficiency
-----------------------------

class psynet.demography.general.LanguagesInOrderOfProficiency(label=None, prompt=None, control=None, time_estimate=5, save_answer=None)

   Bases: "LanguageList"

   A free-text response page for participants to input multiple
   language in order of proficiency.


   Inherits from
   ~~~~~~~~~~~~~

   LanguageList

   default_label

      The default label for this page. May be overwritten with a label
      parameter when called.

      Type:
         str

   default_prompt

      The default prompt instructing participants to list languages in
      order of proficiency. May be overwritten with a prompt parameter
      when called.

      Type:
         str or callable

   default_control

      The default control used for user input (free-text). May be
      overwritten with a Control parameter when called (unlikely to be
      needed).

      Type:
         Control


SpeechDisorders
---------------

class psynet.demography.general.SpeechDisorders(label='speech_disorders')

   Bases: "Module"

   Asks about speech-language therapy and a dyslexia diagnosis.


GMSI
====

class psynet.demography.gmsi.GMSI(label='gmsi', short_version=False, subscales=None, info_page=None)

   Bases: "Module"

   The *Goldsmiths Musical Sophistication Index* (GMSI) questionnaire.

   Parameters:
      * **label** (*str**, **default: "gmsi"*) -- A label used to
        distinguish the module from other modules in the timeline. In
        the case of multiple GMSI instances within a single timeline
        this label also allows to differentiate between the variable
        names used to store the participant's final scores; see
        "VarStore" for details.

      * **short_version** (bool, optional, default: *False*) --
        Whether to use the reduced set of 29 questions. The citation
        for this short version is Lin, H. L., Frieler, K., &
        Müllensiefen, D. (2021). Development and Validation of Short
        Forms of the Goldsmiths Musical Sophistication Index in Three
        Languages. ICMPC/ESCOM 2021. See also https://shiny.gold-
        msi.org/gmsiconfigurator/ and
        https://www.youtube.com/watch?v=x_0DomCP8Rs.

   subscales: List, optional, default: *None*
      The subscales to be included in the questionnaire. Possible
      subscales are *Active Engagement*, *Emotions*, *General*,
      *Musical Training*, *Perceptual Abilities, `Singing Abilities*,
      *Absolute Pitch*, *Instrument*, and *Start Age*. If no subscales
      are provided all subscales are selected. Overrides the
      *short_version* parameter.

   info_page : InfoPage, optional, default: *None*
      An "InfoPage" object to be used as an introductionary first
      page. If none is supplied the default one is displayed (see
      source code).


PEI
===

class psynet.demography.pei.PEI(label='pei', info_page=None)

   Bases: "Module"

   Confidence scale (PEI) questionnaire.

   Parameters:
      * **label** (*str**, **default: "pei"*) -- A label used to
        distinguish the module from other modules in the timeline.

      * **info_page** (InfoPage, optional, default: *None*) -- An
        "InfoPage" object to be used as an introductionary first page.
        If none is supplied the default one is displayed (see source
        code).
