Description
Return the first adjacent choice-label switch.
Behavioral-economics tasks compare supplied payoffs, reference points, budgets and observed choices. A gap, dominance flag or response fraction illustrates a declared convention without identifying a psychological bias, predicting real choices or selecting a suitable financial action.
Return the first adjacent choice-label switch.
When to use this tool
Use Choice Switch Position Index when checking the stated experimental payoff, budget, reference or choice convention.
How to use the tool and how it works
- Enter choices. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read firstSwitchIndex, switched. Inspect switched before interpreting the associated values.
Return the first adjacent choice-label switch. firstSwitchIndex is the zero-based index whose choice differs from its predecessor, or -1; switched reports whether found.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| choices | Choices | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| firstSwitchIndex | Zero-based position after the first adjacent change, or -1 if none. | Required. Safe integer. |
| switched | Switched | Required. Boolean. |
{
"input": {
"choices": [
"A",
"A",
"B",
"A"
]
},
"output": {
"firstSwitchIndex": 2,
"switched": true
}
} Limitations and assumptions
- Only the first switch is returned; later reversals, meaningful order and preference consistency are not evaluated.
- 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 a well-defined study design and complete data to estimate behavior; assess real financial rights, consequences and uncertainty independently.
References
Similar or alternative tools
- Choice Switch Interval Midpoint
Return midpoint and half-width of a supplied switch interval.
- Decoy Choice Dominance One Pair
Check componentwise choice dominance under supplied directions.