[[valueSD()]]
This translation is older than the original page and might be outdated. See what has changed.
Translations of this page:
 

This is an old revision of the document!


valueSD()

float valueSD(string question)

float valueSD(string question, string|array items)

float valueSD(array variables)

Calculates the standard deviation of the answer codes for all items in a question (e.g. a scale), for selected items, or for a list of variables.

  • question – ID of a question (as a string)
  • items – A list (string or array) of items
  • variables – A list (array) of variable IDs as stated in the Variables Overview

Note: This works in the same way as valueSum() – the parameters are described in detail in this chapter with various examples.

Examples

The following PHP code identifies participants who always selected the same value (straight-lining) in the scale “AB01”, and sends them to the end of the questionnaire immediately.

$sd = valueSD('AB01');
if ($sd == 0) {
  goToToPage('end');
}

The following PHP code displays a message to participants who predominately chose the same value in the scale “AB02”.

$sd = valueSD('AB02');
if ($sd < 0.25) {
  text('think more');
}

Note: The standard deviation of a scale is not a valid indication of data quality in a questionnaire. 1). Only use the above examples with the utmost caution.

1)
Leiner, Dominik J. (2014). Too Fast, Too Straight, Too Weird. Post Hoc Identification of Meaningless Data in Internet Surveys. Available on https://www.researchgate.net/publication/258997762
en/create/functions/valuesd.1422114262.txt.gz · Last modified: 24.01.2015 16:44 by alexander.ritter
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki