Skip to content

Main content

Time Use Social Category Share Tool

Calculate time use social category share from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter categoryDurations, selected. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
categoryDurationsCategory DurationsRequired. Array of finite number; minimum 0; maximum items 256.
selectedSelectedRequired. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
selectedDurationSelected DurationRequired. Finite number.
shareDimensionless share on the numerator and denominator basis stated above.Required. Finite number.
definedWhether the stated denominator or normalization exists; inspect before interpreting a zero placeholder.Required. Boolean.
json
{
  "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

  1. Calculation and input contract: gerontology/time-use-social-category-share — tool.io

Similar or alternative tools