Description
For each response, optionally apply JavaScript trim before comparing it exactly with the supplied missingTokens.
Survey display order, self-description, missingness, and record support are distinct research properties. Literal tokens and counts can preserve those distinctions without inferring a person's identity, preferences, or the meaning of an unprovided response.
For each response, optionally apply JavaScript trim before comparing it exactly with the supplied missingTokens.
When to use this tool
Use Survey Self Description Missingness when you need a transparent survey-record, display-order, or time-use calculation.
How to use the tool and how it works
- Enter responses, missingTokens, trimBeforeComparison. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read missingCount, observedCount, missingPositions. Use the output convention below.
For each response, optionally apply JavaScript trim before comparing it exactly with the supplied missingTokens. Return missing indexes, missing count, and the remaining observed count.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| responses | Responses | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| missingTokens | Missing Tokens | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| trimBeforeComparison | Trim Before Comparison | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| missingCount | Missing Count | Required. Safe integer. |
| observedCount | Observed Count | Required. Safe integer. |
| missingPositions | Missing Positions | Required. Array of safe integer; maximum items 256. |
{
"input": {
"responses": [
"person-defined",
" ",
"skip"
],
"missingTokens": [
"",
"skip"
],
"trimBeforeComparison": true
},
"output": {
"missingCount": 2,
"observedCount": 1,
"missingPositions": [
1,
2
]
}
} Limitations and assumptions
- Only responses are trimmed, not the supplied tokens. Matching is case sensitive and caller-defined; observed means not matched as missing, not a validated identity or a complete substantive response.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the study's consent, vocabulary, missingness, and disclosure methodology for interpretation. Retain self-described information and assess sampling and privacy separately from local record arithmetic.
References
Similar or alternative tools
- Survey Self Description Opt Out Distinction
Compare response exactly with each, returning opted-out, missing, or self-described; retain the response only for the last state and otherwise return an empty string.
- Self Report Category Display Index
Return listed according to exact membership and displayIndex from zero-based indexOf.