SoSci Survey
Translations of this page:


float valueMean(string question)

float valueMean(string question, string|array items)

float valueMean(array variables)

Calculates the mean (average, expectation value) of the answer codes for all items in a question (e.g. a scale), 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 this chapter in detail with various examples.


In the following example, question “AB02” will be displayed if the mean in the scale “AB01” is at least 1.5.

$mean = valueMean('AB01');
if ($mean >= 1.5) {
en/create/functions/valuemean.txt · Last modified: 24.01.2015 17:15 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