Multiple Linear Regression
Multiple linear regression in R with lm() — read the summary (coefficients, p-values, R²) and turn it into a clean table with gtsummary.
Predict a numeric outcome from several variables at once.
Run the code
Everything in the video — edit it and press Run Code to run real R right here, or copy it:
Note
The first Run Code installs the packages this lesson needs (gtsummary) into your browser session — give it 20–40 seconds (gtsummary is large — if it is slow in the browser, download the R script and run it locally).
Download this R script · ▶ Open the full playground
When to use it. Use it to model a continuous outcome and adjust for confounders. Check assumptions (linearity, constant variance, normal residuals) before trusting the coefficients.
Try the linear regression calculator · read interpreting lm output.