Description
Return a diary bin under left-closed or right-closed policy.
Behavioral-study coding depends on observation intervals, missing samples, event records and assignment rules. Partial-, whole- and momentary-sampling summaries answer different questions; local agreement or coverage does not establish actual behavior, a diagnosis or an effective intervention.
Return a diary bin under left-closed or right-closed policy.
When to use this tool
Use Behavioral Diary Timebin Boundary Choice when checking the stated behavioral-research observation, assignment, coverage or coding convention.
How to use the tool and how it works
- Enter time, origin, width, rightClosed. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read index, lower, upper. Use the output convention below.
Return a diary bin under left-closed or right-closed policy. Require width > 0; index = floor((time-origin)/width) for left-closed, or ceil((time-origin)/width)-1 for right-closed, then return adjacent boundaries.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| time | Time | Required. Finite number. |
| origin | Origin | Required. Finite number. |
| width | Interval, bin, geometry or dimension width under the specific convention above. | Required. Finite number; strictly above 0. |
| rightClosed | True uses bins (lower,upper]; false uses [lower,upper). The right-closed origin belongs to index -1. | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| index | Position under the explicit zero-/one-based convention, including any stated missing-position sentinel. | Required. Safe integer. |
| lower | Lower | Required. Finite number. |
| upper | Upper | Required. Finite number. |
{
"input": {
"time": 20,
"origin": 0,
"width": 10,
"rightClosed": false
},
"output": {
"index": 2,
"lower": 20,
"upper": 30
}
} Limitations and assumptions
- An exact origin enters bin -1 for the right-closed convention; no time-zone interpretation or actual diary reconstruction occurs.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use verified observations and the study’s complete sampling/coding protocol, with appropriate statistical and professional interpretation for health or intervention decisions.
References
Similar or alternative tools
- Behavioral Duration Overlap Correction
Return overlap-corrected behavioral duration share.
- Momentary Sample Boundary State
Check a momentary sample against a state interval.