Drill 2: what kind of outcome?
Binary, categorical, ordinal, count, time to event. The outcome's form is the hint in each study, and some of them are in disguise.
What runs in CodeSplash
- Two independent proportions (z, Fisher, Boschloo, Barnard, non-inferiority) Verified in Python and R
- χ² test of independence Verified in Python and R
- Exact test of independence for R × C tables (Fisher–Freeman–Halton) Verified in Python and R
- Poisson rates (one rate or two rates compared) Verified in Python and R
- Log-rank test (compare survival curves) Verified in Python and R
- Ordinal logistic regression (proportional odds) Verified in Python and R
- Logistic regression (binary outcome) Verified in Python and R
- Zero-inflated and hurdle count models Verified in Python and R
- Cumulative incidence with competing risks Verified in Python and R
- Kaplan–Meier survival curves Verified in Python and R
- Count regression (Poisson / negative binomial) Verified in Python and R
You will be able to
- Classify an outcome from a short description, including disguised ones
- Choose a method for binary, categorical, ordinal, count and time-to-event outcomes
Read first
Look at the outcome first
ReadEach study below hides its outcome type in plain language. Before reading the options, say it out loud: binary, categorical, ordinal, count, or time to event?
Then ask what it is being compared across, and whether follow-up differs.
Round one
CheckpointCheck yourself
Two ad versions, with about 3,000 impressions each. The outcome is whether the person clicked. Which fits best?
Show the answer
Answer: a
A binary outcome in two independent groups. The card also gives Fisher and odds ratios when you need them.
Check yourself
A small pilot: 3 of 12 improved on the drug, 9 of 12 on placebo. Which fits best?
Show the answer
Answer: b
With small expected counts the chi-square approximation isn't reliable. Use an exact test, which is what the Test Chooser suggests when expected counts are below 5.
Check yourself
Hair color (4 levels) against eye color (4 levels) in 500 people. Do they relate?
Show the answer
Answer: a
Two nominal variables, so a table test. Expected counts are large here. A trend test needs ordered groups, and McNemar needs matched pairs.
Check yourself
Accidents per factory, and factories have operated for different numbers of hours. Compare two regions. Which fits best?
Show the answer
Answer: b
Counts differ partly because exposure differs. Rates make the comparison fair.
Round two
CheckpointCheck yourself
Time from sign-up to first purchase, for two onboarding flows. Many users haven't purchased yet. Which fits best?
Show the answer
Answer: c
Users who haven't bought are censored, not missing. Dropping them biases the comparison, and logistic regression throws away the timing.
Check yourself
Severity (mild, moderate, severe) predicted from age, sex and treatment. Which fits best?
Show the answer
Answer: c
An ordered outcome with several predictors. Multinomial wastes the order, and a linear model imposes equal spacing. Check the proportional odds row.
Check yourself
Doctor visits per patient per year. Most patients have zero, and a few have many, with more zeros than a Poisson or negative binomial allows. Which fits best?
Show the answer
Answer: c
Excess zeros suggest two processes: whether a person ever visits, and how often. A zero-inflated model handles both. Compare with a plain count model first.
Check yourself
Time to relapse, but some patients die first, without relapsing. You want the probability of relapse over time. Which fits best?
Show the answer
Answer: b
Death prevents relapse, so it isn't ordinary censoring. Treating it that way overstates the relapse probability.
A disguised one
PredictPredict first
Survey answer: "How many days last week did you exercise?" (0 to 7). You are comparing two groups. How would you treat that outcome?
Reveal
It depends, and that is the right instinct. It is a bounded count with a pile-up possible at 0 and at 7. With large groups and a decent spread, a t test on means can be reasonable. With a pile-up at one end, use a rank test or a count or ordinal model, and check the shape in Insights first.
Bring your own outcome
In the appLook at a column in Insights and ask what type it really is, whatever its storage says. Then bind it in the Test Chooser. The chooser reads shape facts such as skew, zeros and expected counts from the bound columns, and shows them as evidence.
Recap
Recap- Name the outcome type before you look at any test.
- Differing exposure calls for rates; differing follow-up calls for time-to-event methods.
- Censoring isn't missingness, and a competing event isn't censoring.