Description
Sum selected duration and divide by total duration, otherwise return share zero with defined false for all-zero durations.
Research time coordinates can represent age, residence, observation, or follow-up. Fixed year lengths and censored intervals are modeling conventions; an unfinished observation supplies less timing information than a completed event.
Sum selected duration and divide by total duration, otherwise return share zero with defined false for all-zero durations.
When to use this tool
Use Time Use Social Category Share when you need an ageing-research interval calculation with an explicit time basis.
How to use the tool and how it works
- Enter categoryDurations, selected. 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 selectedDuration, share, defined. Inspect defined before interpreting the associated values.
Require aligned nonnegative categoryDurations and selected flags. Sum selected duration and divide by total duration, otherwise return share zero with defined false for all-zero durations.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| categoryDurations | Category Durations | Required. Array of finite number; minimum 0; maximum items 256. |
| selected | Selected | Required. Array of boolean; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| selectedDuration | Selected Duration | Required. Finite number. |
| share | Dimensionless share on the numerator and denominator basis stated above. | Required. Finite number. |
| defined | Whether the stated denominator or normalization exists; inspect before interpreting a zero placeholder. | Required. Boolean. |
{
"input": {
"categoryDurations": [
2,
6,
2
],
"selected": [
true,
false,
true
]
},
"output": {
"selectedDuration": 4,
"share": 0.4,
"defined": true
}
} Limitations and assumptions
- Categories must already follow the intended overlap and coding rules; this summarizes supplied time rather than social isolation, wellbeing, or a health outcome.
- 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 actual calendar dates for calendar age and an appropriate censoring-aware analysis for incomplete follow-up. Verify origin, units, and event definitions against the study protocol.
References
Similar or alternative tools
- Gerontology Questionnaire Time Window Overlap
Require positive-length intervals, return their overlap and summed durations minus overlap as unionDuration, then divide overlap by union.
- Older Adult Social Contact Day Rate
Return events per observed day, contact-day share, and events per contact day.