Which variable are you trying to explain?
Before you can choose a test, you need to know which variable is the outcome and which is the predictor. This sounds obvious. It isn't.
Getting this backwards is one of the most common mistakes in clinical research.
Every analysis has a direction. You're using one variable to explain or predict another.
Get the direction wrong, and you're answering the wrong research question entirely.
Every variable in your analysis plays one of two roles.
The thing you're trying to explain, predict, or compare.
What you MEASURE to see if something worked
The "effect" in cause and effect
What changes in response to other variables
The thing you think might influence the outcome.
What you MANIPULATE or OBSERVE to see its effect
The "cause" in cause and effect
What you use to explain variation in the outcome
Ask yourself: What am I trying to predict or explain? That's your outcome. What do I think influences it? Those are your predictors.
The outcome variable type determines which regression family you use.
You're answering a completely different research question.
The predictor variable type matters less. You can have continuous, categorical, or any type of predictors. But the outcome type dictates your entire analysis approach.
Sometimes the outcome isn't obvious. Here's how to think through it.
"What if I have multiple outcomes?"
Pick a primary outcome. This should be the most clinically important one that answers your main research question. Secondary outcomes are analyzed separately. Don't combine them or you'll create a statistical mess (and reviewers will call you out).
"What if two variables could go either way?"
Think about causation and your research question. Age predicts mortality (not the reverse). Treatment predicts outcome (you're testing the treatment). BMI predicts complications (not the reverse). If you're testing an intervention or exposure, that's always the predictor.
"What about correlation studies?"
Correlation has no direction. It just measures association. But the moment you run a regression, you've declared an outcome. Even if you call it "exploratory," you've picked a direction.
"What if I'm comparing groups?"
The groups are the predictor, the measurement is the outcome. "Does operative time differ between robotic and open surgery?" Group (robotic vs open) is the predictor. Operative time is the outcome.
If your research question starts with "Does X affect Y?" or "Is X associated with Y?", then Y is your outcome and X is your predictor.
For each research question, identify which variable is the outcome.
How to identify outcome and predictor variables in any study. This determines which statistical tests are even options for your analysis.
Next lesson: Paired vs Independent. Are you comparing the same subjects or different subjects?