返回 Skill 列表
extension
分类: 效率与办公无需 API Key

revman-calculator

RevMan data calculator for systematic reviews. Computes SD from SE/CI/IQR/range, calculates contrast data (OR/RR/RD/MD/SMD) from arm data, and combines study arms. Use when the user types `revman calc`.

person作者: TashanworldhubOpenAPI

RevMan Calculator

Overview

Provides RevMan's data computation utilities via a Python backend. Three modes: SD imputation, contrast calculation, and arm combination.

Command

revman calc

Show the calculator menu:

RevMan Calculator
Available modes:
  sd           Impute SD from SE, CI, IQR, or range
  contrast     Calculate effect size from arm data
  combine      Combine two or more study arms

revman calc sd

Impute a standard deviation from other statistics.

Procedure:

  1. Ask which input statistic is available:
    What do you have?
      1. Standard Error (SE) and sample size (n)
      2. Confidence Interval (CI) and sample size (n)
      3. Interquartile Range (IQR) and sample size (n)
      4. Range (min-max) and sample size (n)
    
  2. Collect required inputs from the user.
  3. Run:
    echo '{"mode":"sd_se","params":{"se":<se>,"n":<n>}}' | python3 scripts/revman-calc.py
    
    Use mode key: sd_se, sd_ci, sd_iqr, or sd_range.
  4. Display results and formulas.
  5. Offer to copy the result: "Use this SD in your study data? Type the study_id to save it."

revman calc contrast

Calculate an effect size from arm-level data.

Procedure:

  1. Ask data type:
    Data type:
      1. Dichotomous (events/total per arm)
      2. Continuous (mean/SD/n per arm)
    
  2. For dichotomous, ask: effect measure (OR, RR, RD), events and total for each arm.
  3. For continuous, ask: effect measure (MD, SMD), mean/SD/n for each arm.
  4. Run:
    echo '{"mode":"contrast","params":{"data_type":"dichotomous","a1_events":<e>,"a1_total":<t>,"a2_events":<e>,"a2_total":<t>,"measure":"OR"}}' | python3 scripts/revman-calc.py
    
  5. Display results: estimate, SE, 95% CI, and formulas.
  6. Offer to save to the active review's study data.

revman calc combine

Combine two or more study arms into one.

Procedure:

  1. Ask data type (dichotomous or continuous).
  2. For dichotomous: collect events and total for each arm.
  3. For continuous: collect mean, SD, n for each arm.
  4. Run:
    echo '{"mode":"combine","params":{"data_type":"dichotomous","arms":[{"events":<e>,"total":<t>},...]}}' | python3 scripts/revman-calc.py
    
  5. Display combined results.
  6. Offer to save to study data.

Script Location

scripts/revman-calc.py — Python 3 script. Accepts JSON on stdin, returns JSON on stdout.

Modes: sd_se, sd_ci, sd_iqr, sd_range, contrast, combine


Error Handling

| Situation | Response | |-----------|----------| | Script not found | "Calculator script not found. Check scripts/revman-calc.py exists." | | Invalid inputs | "Invalid input: {detail}. All values must be positive numbers." | | Division by zero | "Cannot compute: arm has zero events and zero non-events." | | Unknown mode | "Unknown calculation mode. Use revman calc to see options." |