Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:functions:statistic [02.12.2014 20:02] – alexander.ritter | en:create:functions:statistic [02.12.2014 20:10] – [Min, Max and Mean of the Valid Data] alexander.ritter |
---|
* '''count''' -- counts the frequency of the value specified as ''//option//''. | * '''count''' -- counts the frequency of the value specified as ''//option//''. |
* '''percent''' -- percentage of the value specified as ''//option//''. | * '''percent''' -- percentage of the value specified as ''//option//''. |
* '''crosscount''' -- counts the frequency of the joint occurrence of two values in two variables. The two variables should be specified in an array (or separated with a comma), as well as their values that are specified as ''//option//''. | * '''crosscount''' -- counts the frequency of the joint occurrence of two values in two variables. The two variables should be specified as an array (or separated with a comma), as well as their values that are specified as ''//option//''. |
* '''mode''' -- most commonly occurring value. | * '''mode''' -- most commonly occurring value. |
* '''min''' -- lowest value. | * '''min''' -- lowest value. |
The '''crosscount''' statistic counts the cases (like in cross-tabulations) in which multiple variables apply. | The '''crosscount''' statistic counts the cases (like in cross-tabulations) in which multiple variables apply. |
| |
Instead of a single variable, two or more variables are specified in an array or separated with a comma ('',''). The values being counted for each variable are specified as the third parameter //option//. Only cases which have specified the first value for the first variable, the second value for the second variable and so on are counted. | Instead of a single variable, two or more variables are specified as an array or separated with a comma ('',''). The values being counted for each variable are specified as the third parameter //option//. Only cases which have specified the first value for the first variable, the second value for the second variable and so on are counted. |
| |
<code php> | <code php> |
===== Valid Percent ===== | ===== Valid Percent ===== |
| |
The output is the percentage of a value within all valid data. The value that should be counted must be given as the third argument. | The output is the percentage of a value within all valid data. The value to be counted must be given as the third argument. |
| |
<code php> | <code php> |
===== Mode: Value that Occurs Most Frequently ===== | ===== Mode: Value that Occurs Most Frequently ===== |
| |
Returns the value that has been selected most frequently so far. If multiple values have been selected equally often then these are returned separated by a comma. | This returns the value that has been selected most frequently so far. If multiple values have been selected equally often then these are returned separated by a comma. |
| |
As a third argument (in this instance a Boolean), it is possible to specify if invalid values (no answer etc.) should also be counted. | As a third argument (in this instance a Boolean), it is possible to specify if invalid values (no answer etc.) should also be counted. |
===== Min, Max and Mean of the Valid Data ===== | ===== Min, Max and Mean of the Valid Data ===== |
| |
The statistics '''min''', '''mean''' und '''max''' only calculate a correct value if numerical values exist for the question. Data in a text input is ignored if it is not a number -- unless (''true'') is given for the third parameter, that invalid values should also be entered in the statistics. | The statistics '''min''', '''mean''' und '''max''' only calculate a correct value if numerical values exist for the question. Data in a text input is ignored if it is not a number -- unless is it is specified that invalid values should also be entered into the statistics (''true'') as the third parameter. |
| |
If no valid values are available up to now, 0 is returned for the '''mean'', and the value ''false'' for the ''min'' and ''max''. | If no valid values are available, 0 is returned as the '''mean'', and the value ''false'' as the ''min'' and ''max''. |
| |
<code php> | <code php> |