Do the figures make sense? (checking plausibility, rules for the data)
In brief
Do the values in my data make sense? The data assistant "Check plausibility" (Edit data) sets up rules and lists the rows that violate a rule. It changes nothing in the data. If you like, a column is created with the number of violated rules per row.
How it works in Statable
- Under "New rule" choose the kind, enter the columns and values, "Add rule".
- "Check rules". With large files Statable shows the progress; checking can be cancelled.
- Optionally create a column with the number of violated rules per row (default: Verletzte_Regeln).
The kinds of rules
- Range of values: a number column lies between a smallest and a largest value. One of the two limits may be left out.
- Allowed values: a column has only values from a list, one per line.
- If A, then B: if a fixed comparison in column A is true, a fixed comparison in column B must be true as well. For text there are only "=" and "≠".
- Sum equals column: several columns add up to one column, with a tolerance by which the sum may differ.
- Unique key: the chosen columns together occur only once. A row whose key occurs more than once violates the rule.
There is no free expression. Every rule has a fixed form.
Reading the result
- For each rule there are three numbers: checked, violated and not checkable.
- "Not checkable" means: a value the rule needs is missing in this row. It counts neither as violated nor as met.
- The list shows the rows with violated rules, at most 1,000. If there are more, a sentence says how many there are in total.
- For "If A, then B" it is stated in how many rows the condition A was true. Where A is not true, the rule is met.
- If a rule refers to a column that does not exist, or does not fit the type of the column, it is not checked; a sentence says why.
Trap: what the check does not do
- Statable only shows where a rule is not met and changes nothing. Whether a value is wrong and what then applies is for the person to decide.
- A rule that is met does not prove that the value is correct.
Saving rules
The rules belong to the project and are also part of the template of the project. With "Save rules as file" they can be passed on, and "Read rules from file" adds the rules read to the existing ones. A rules file may be at most 2 MB.
Requirements and limits
- At most 50 rules, and at most 500 values in a list of allowed values.
- Empty cells, invalid values and values marked as "no answer" in the data count as missing.
- Even with very many rows the page does not freeze, because the calculation is done in portions.
Typical examples
- The age lies between 0 and 120.
- If "Employed" equals "no", then "Working hours" equals 0.
- The partial amounts add up to the total amount, with a tolerance of 0.5.
- An identification number occurs only once.