Clinical Trial Stats Tools

Configuration File: clinical_trial_stats_tools.json Tool Type: Local Tools Count: 1

This page contains all tools defined in the clinical_trial_stats_tools.json configuration file.

Available Tools

clinical_trial_ae_severity_test (Type: ClinicalTrialAESeverityTestTool)

Merge clinical trial demographics (DM) and adverse-events (AE) CSVs and run a statistical test on…

clinical_trial_ae_severity_test tool specification

Tool Information:

  • Name: clinical_trial_ae_severity_test

  • Type: ClinicalTrialAESeverityTestTool

  • Description: Merge clinical trial demographics (DM) and adverse-events (AE) CSVs and run a statistical test on AE severity (AESEV) across treatment groups. Uses the correct convention: max(AESEV) per subject across ALL AE records (no AEPT pre-filtering), inner-joined to DM on USUBJID. Supports three tests: ‘prepare’ (merge only, returns n_subjects and AESEV distribution), ‘chi-square’ (group x AESEV contingency test, returns chi2/p/dof/contingency_table), and ‘ordinal’ (ordinal logistic regression with optional covariates, returns odds ratio, 95% CI, p-value, and model summary). Use for clinical trial safety signal analyses comparing AE severity by treatment arm or subgroup.

Parameters:

  • dm_file (string) (required) Path to demographics CSV. Must contain USUBJID and the group_col.

  • ae_file (string) (required) Path to adverse-events CSV. Must contain USUBJID and AESEV.

  • test (string) (required) Statistical test to run. ‘prepare’ returns only the merged cohort stats.

  • group_col (string) (optional) Column in DM identifying treatment/exposure group. Default: TRTGRP.

  • subgroup ([‘string’, ‘null’]) (optional) Optional filter expression ‘col=value’ (e.g. ‘expect_interact=Yes’).

  • covariates ([‘string’, ‘null’]) (optional) Comma-separated covariate column names for ordinal regression (e.g. ‘patients_seen_cat,expect_interact_cat’).

Example Usage:

query = {
    "name": "clinical_trial_ae_severity_test",
    "arguments": {
        "dm_file": "example_value",
        "ae_file": "example_value",
        "test": "example_value"
    }
}
result = tu.run(query)