Free tool · Version 1.5

AskDimitri Stats

Open your spreadsheet, let it suggest the right test, run it, and take away the figure, the two sentences for your manuscript and the citation. Made for surgeons, residents and international medical graduates who want statistics done properly without a statistics degree.

Everything is computed in your browser. Nothing you type or paste is sent anywhere. Even so, do not paste identifiable patient data: no names, initials, record numbers or dates of birth. Codes and numbers are enough.

  1. Your dataOpen a spreadsheet, or paste
  2. Which test?Say what you want to know
  3. ResultsFigure, sentences, citation

For your manuscript

How to cite AskDimitri Stats

DOI10.5281/zenodo.24546187

Cite the version you used. Version 1.6 is archived on Zenodo with its own DOI, so a reader can check the very code that ran. The methods sentence goes in your methods, the citation in your references.

Step one

Your data

Open your Excel or CSV file: you pick its columns, nothing is retyped. It works best with one row per patient, one column per variable and the column names in the first row.

Drop an Excel or CSV file here, or

Your file is read on this page, in your browser. Nothing is uploaded or sent anywhere. Even so, do not load identifiable patient data: remove names, record numbers, dates of birth, addresses and phone numbers first, and use study codes.

Excel (.xlsx), CSV, or tab-separated text (.tsv, .txt), up to 20 MB and 100,000 rows. An old .xls file: save it as .xlsx or CSV first. No file to hand? Every analysis below has an example sheet, and takes pasted values too.

Step two

Which test should I run?

First write down your question: the population, the endpoint, the comparison, the time frame and the summary you want to estimate. For the main analysis of a study, involve your statistician.

Answer up to eight short questions about your study. The answer names the analysis, says why in one line and takes you to it. With a spreadsheet open, you pick its columns instead and most questions answer themselves.

    What do you want to do?

    Step three

    Choose an analysis

    Each analysis opens on its own: it says when to use it, takes your columns (or pasted values) and gives the answer first, then the figure, the sentences for your manuscript and how to cite it.

    Describe

    Describe one variable

    When to use it First, for any measurement: it gives the mean (SD) and the median (IQR), with a histogram and rough shape checks to help you choose.

    No data to hand?

    Table 1: baseline characteristics

    When to use it You need the table of patient characteristics for a paper or a report: several variables at once, for all patients or by group. One row per patient.

    Were the groups randomized?

    An empty cell, NA or a dot counts as missing. A column that looks identifying is left out, but do not paste names, record numbers or dates of birth.

    No data to hand?

    One group against a value

    When to use it One group and a number to compare it with: a target, a normal value or a published figure. For example: is our operating time different from the 180 minutes reported in the literature? Or: is our 80% complication rate different from a published 60%?

    A measurement against a value

    Test

    No data to hand?

    One proportion against a fixed rate

    Events out of a total in one group, against a target or a published percentage: 40 of 50 patients against 60%. If each patient has a predicted risk from a model, use observed against expected instead.

    No data to hand?

    Categories against expected shares: chi-square goodness of fit

    When to use it One group sorted into categories, and shares fixed in advance to compare with: a published distribution, or a design that planned them. To compare groups with each other, use Chi-square and Fisher.

    The shares add up to 100 (percentages) or 1 (proportions).

    No data to hand?

    Compare groups

    Compare a measurement between two groups

    When to use it A measurement (blood loss, length of stay, a score) in two groups of patients, or the same patients measured twice. The t-test compares means. With skewed data, choose by what you planned to compare: the means (permutation Welch), trimmed means (Yuen-Welch) or the medians, for two independent groups, or whether values tend to be higher in one group (Brunner-Munzel or Mann-Whitney), which is a different question.

    Design
    Test

    No data to hand?

    Compare a measurement across three or more groups

    When to use it A measurement in three or more groups of different patients (open, laparoscopic and robotic, for example). It tells you whether the groups differ, and which from which.

    Test

    No data to hand?

    Chi-square and Fisher's exact test

    When to use it The outcome is yes or no, or a category, in groups of different patients (a leak after stapled or hand-sewn anastomosis). For a 2 x 2 table you also get the risk ratio, odds ratio, risk difference and the number needed to treat.

    Groups in the rows, the outcome in the columns, the event first.

    No data to hand?

    Mortality

    When to use it To compare death rates between two groups, or your observed deaths with the number a risk score (EuroSCORE II, STS, NSQIP) expected.

    Two groups

    1 2

    No data to hand?

    Observed against expected

    Expected deaths come from

    No data to hand?

    Paired and agreement

    Paired yes or no: McNemar's test

    When to use it The same patients answer a yes-or-no question twice (anaemic before surgery and at discharge), or matched pairs. A chi-square test would be wrong here: it ignores the pairing.

    Count the pairs: rows are the first measurement, columns the second. The two shaded cells are the patients who changed.

    Second: yesSecond: no
    First: yes
    First: no

    No data to hand?

    Yes or no, three or more times: Cochran's Q

    When to use it The same patients answer a yes-or-no question on three or more occasions (pain at day 1, day 7 and day 30). It asks whether the chance of a yes is the same on every occasion; exact McNemar tests, Holm-adjusted, show which pairs differ. For two occasions use McNemar.

    A patient missing an occasion is left out: the test needs every patient on every occasion.

    No data to hand?

    Three or more measurements on the same patients: Friedman test

    When to use it The same patients are measured three or more times, and you ask whether values tend to rank higher on some occasions. It does not test means or medians. A repeated-measures model, which can test means, needs a statistician and is not on this page.

    A patient missing an occasion is left out. Write an ordered scale as numbers.

    No data to hand?

    A category measured twice: Stuart-Maxwell and Bowker

    When to use it The same patients are sorted into three or more categories on two occasions. The page reports two tests, because they answer two questions: did the totals change (Stuart-Maxwell), and did as many patients move each way between every pair of categories (Bowker)?

    Your data

    Rows: the first occasion. Columns: the second. The diagonal is the patients who did not change.

    No data to hand?

    Agreement between two raters: Cohen's kappa

    When to use it Two raters sort the same cases into categories (grades, yes or no) and you want to know how well they agree beyond chance. For ordered grades, weighted kappa gives partial credit for near misses.

    Your data

    Rows: rater 1. Columns: rater 2. The diagonal is where they agree.

    No data to hand?

    Agreement on a measurement: ICC and Bland-Altman

    When to use it Two or more raters, or two methods, measure the same cases on a scale (a diameter in mm, a score). Not a correlation: two readers can correlate perfectly and still disagree by 5 mm every time.

    No data to hand?

    Associations

    Correlation between two measurements

    When to use it Two measurements on the same patients that may rise and fall together (age and length of stay). It measures the strength of the association, not cause, and not agreement.

    Coefficient

    No data to hand?

    Regression

    Logistic regression: a yes or no outcome, adjusted for other variables

    When to use it The outcome is yes or no (complication, readmitted, died in hospital) and you want its association with a group or a measurement, with other variables such as age or ASA grade held fixed. Choose the covariates in advance. Each row must be one patient. For time to an event with censoring, use Cox regression.

    A column that looks identifying starts unticked, but do not paste names, record numbers or dates of birth.

    Method

    No data to hand?

    Linear regression: a measurement, adjusted for other variables

    When to use it The outcome is a measurement (length of stay, blood loss) and you want its association with a group or another measurement, with other variables such as age or ASA grade held fixed. Choose the covariates in advance. Each row must be one patient. Look at the residuals against the fitted values before you trust the CIs.

    A column that looks identifying starts unticked, but do not paste names, record numbers or dates of birth.

    No data to hand?

    Propensity score

    Propensity score: weighting and matching

    When to use it Two treatment groups that were not randomized, and you want to compare an outcome between them after balancing the groups on what was measured before the treatment was chosen. It balances only the covariates you give it, and it needs enough patients: at least 20 in each group, and the intervals are approximate below about 200. The outcome is a yes or no, a measurement, or the time to an event. Each row must be one patient.

    A column that looks identifying starts unticked, but do not paste names, record numbers or dates of birth.

    Whom is the comparison about?

    No data to hand?

    Survival

    Survival: Kaplan-Meier and the log-rank test

    When to use it The outcome is the time until an event (death, recurrence) and some patients have not had it yet (censored). Up to six groups. To adjust for age or risk, use Cox regression. Only have a published curve? Reconstruct the patient data from the Kaplan-Meier curve.

    No data to hand?

    Cox regression: survival adjusted for other variables

    When to use it You compare survival, but other factors (age, ASA grade) also differ between the groups. Each hazard ratio is adjusted for the others. With few events per covariate the estimates are unstable; 10 per covariate is only a rough guide.

    A column that looks identifying starts unticked, but do not paste names, record numbers or dates of birth.

    Tied event times

    No data to hand?

    Meta-analysis

    Meta-analysis: pool published studies

    When to use it You have the results of several published studies of the same question and want one pooled estimate: a forest plot, how much the studies disagree (heterogeneity), and whether small studies tell a different story (a funnel plot). Hazard ratios you reconstructed from Kaplan-Meier curves can be pooled here too.

    What does each study report?

    The experimental arm comes first in every study: a ratio below 1 (or a difference below 0) means fewer events, or a lower mean, with it.

    The studies, one per row

    Paste a block copied from Excel into any cell and it fills the table from there. Year and subgroup are optional: the year orders the cumulative analysis, the subgroups get their own subtotals.

    Paste rows from a spreadsheet

    Model

    Both are computed and shown; this chooses the one the answer, the figure and the sentences lead with.

    Advanced: heterogeneity, CI method, zero cells, small-study tests

    No studies to hand?

    Risk-of-bias figures

    When to use it You have judged each study's risk of bias with a published tool or your own checklist, and want the two figures journals ask for: the traffic-light plot (every study in every domain) and the summary bar plot. The judgements are yours; the page only draws them.

    Your tool's domains

    Type the domain names as your tool gives them (2 to 10); the page suggests none. Name the tool and cite it in your methods.

    The studies, one per row

      Choose a judgement for each domain and the overall judgement you reached. Paste a block copied from Excel into a Study cell and it fills the table from there. With a weight for every study (its weight in the meta-analysis, or its size) the summary plot is weighted; without, each study counts once.

      Paste rows, or open a robvis CSV file

      No judgements to hand?

      Every label is yours: the domain names, the scale and the tool's name you type. Cite the tool you used in your manuscript. The figures follow the layout of robvis (McGuinness and Higgins 2021), which the references cite.

      PRISMA 2020 flow diagram

      When to use it You have run the searches and the screening of a systematic review and need the flow diagram PRISMA 2020 asks for. Type the number in each box: the page checks that they add up from box to box and draws the diagram for your manuscript.

      Which diagram?

      Studies via databases and registers

      Records identified from databases (one row per database, or one total)

      Records identified from registers (type 0 if none was searched)

      Records removed before screening

      Screening

      Reports excluded, with reasons

      Included

      No review to hand?

      The boxes and their labels follow the PRISMA 2020 flow diagram templates (Page MJ, et al. BMJ 2021;372:n71; prisma-statement.org), published under the Creative Commons Attribution licence (CC BY 4.0). The diagram carries the attribution line the licence asks for.

      Plan a study

      Sample size and power

      When to use it Before a study with two groups, or with the same patients measured twice: how many patients you need to detect the difference that matters, or how much power the patients you can get will give you.

      No numbers to hand?

      How it works

      Cite it. If you use an analysis or a figure from this page in a manuscript, please cite the tool: how to cite AskDimitri Stats. Every result also carries the citation with today's date, and its methods sentence names the tool and its version.

      Checked against standard software. Every calculation is written for this page and tested against R or Python: SciPy, statsmodels and lifelines, and R packages where those lack a method. Where the page differs from them on purpose, the methods archived on Zenodo say why. The version number changes whenever a calculation changes.

      Figures for journals. The figures are drawn by code from your numbers: no AI, no logo, no watermark. White background, Inter, editable title and axis labels, a colour-blind-safe palette or greyscale, 89 mm or 180 mm wide, saved as PNG at 300 or 600 dpi, TIFF or SVG.

      Colab notebooks. Each result can be downloaded as a notebook with your data and the Python code that reproduces the numbers and the figure, for you or a statistician to check and extend. To open it: go to colab.research.google.com, choose File > Upload notebook and pick the file, then Runtime > Run all. The notebook is written on this page; nothing is uploaded until you do it yourself.

      What it does not do. No repeated-measures ANOVA. Logistic, linear and Cox regression fit the covariates you choose in advance; nothing here selects them for you, and none of them handles repeated measurements or clustered patients. For a study's main analysis, involve a statistician early.

      Built by Dr. Dimitrios Magouliotis for the doctors who read Dimitri's Letters. See the Privacy policy.

      AskDimitri Stats version 1.6 doi:10.5281/zenodo.24546187 How to cite

      Analyses

      Made with the free AskDimitri Stats: askdimitri.net/tools/stats