Skip to content

Main content

Trial Stratification One Factor Code Tool

Map one supplied stratification factor to its explicit code.

Loading tool…

Description

Map one factor value to a supplied stratum code.

Allocation bookkeeping distinguishes arm counts, indexing and vocabulary matches from generation of a concealed random sequence. Floored targets can leave unassigned remainders, and a local balance score does not establish that an allocation method protects a trial from selection bias.

Map one factor value to a supplied stratum code.

When to use this tool

Use Trial Stratification One Factor Code when checking the stated clinical-research record, allocation, timing, analysis or evidence-basis convention.

How to use the tool and how it works

  1. Enter value, levels, stratumCodes. 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 code, index. Use the output convention below.

Map one factor value to a supplied stratum code. Require aligned levels/stratumCodes, unique levels and recognized value; return matching code and zero-based index.1

Input fieldMeaning and unitsAccepted input
valueValueRequired. Text; maximum UTF-16 length 8192.
levelsLevelsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
stratumCodesStratum CodesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
codeCodeRequired. Text; maximum UTF-16 length 8192.
indexPosition under the explicit indexing convention; inspect any missing-value sentinel.Required. Safe integer.
json
{
  "input": {
    "value": "B",
    "levels": [
      "A",
      "B"
    ],
    "stratumCodes": [
      "S1",
      "S2"
    ]
  },
  "output": {
    "code": "S2",
    "index": 1
  }
}

Limitations and assumptions

  • Code definitions and factor measurements are supplied; this does not create randomization or establish appropriate stratification.
  • 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 complete approved protocol, authenticated source records and qualified clinical/statistical oversight for actual trial design, conduct and interpretation.

References

  1. Calculation and input contract: clinical-trials/trial-stratification-one-factor-code — tool.io

Similar or alternative tools