StatFas emblem: a philosopher beside a rising bar chart StatFas.comAn Easy Way to Do Statistics
Upload Data, and Get Publishable Results in a Few Seconds in APA7 format Docx file

Linear Regression: How to Run It Online and Report It in APA7

Linear regression fits a straight-line (or plane) model that predicts a continuous outcome from one or more predictors.

What is Linear Regression?

Linear regression fits a straight-line (or plane) model that predicts a continuous outcome from one or more predictors.

When to use it

Use it when the outcome is continuous and you want to predict it, estimate each predictor's unique effect, or control for confounders.

Example question: Do study hours and sleep hours predict exam score?

Preparing your data

One row per participant, one numeric column for the outcome and one column per predictor. Categorical predictors should be coded (for example 0 = control, 1 = treatment).

Example dataset (simulated; first rows of 100): id, study_hours, sleep_hours (predictors), exam_score (outcome, 0 to 100).

idstudy_hourssleep_hoursexam_score
1.014.75.479.0
2.012.19.070.0
3.08.96.079.0
4.015.85.183.0
5.014.87.378.0
6.07.87.359.0

Download the full example CSV to practise. If the tool asks for a different layout, follow the instructions on its page.

How to run it on StatFas

  1. Open the Linear Regression tool. You do not need an account to run an analysis.
  2. Enter your data or upload your file, laid out as described in Preparing your data.
  3. Select your variables. Select the continuous outcome and one or more predictors.
  4. Choose any options the tool offers (for example the confidence level, a post hoc test or the error bar type) and run the analysis.
  5. Read the results on the page. Check the assumptions first, then the test statistic, the p-value and the effect size.
  6. To save your results, log in or create a free account. Every analysis stays free; the account is only needed to download.

Assumptions and checks

  • Linearity: the outcome changes in a straight-line way with each predictor (check residual plots).
  • Independence of errors: one row per person; no clustering or repeated measures.
  • Homoscedasticity: residuals have similar spread across predicted values.
  • Normally distributed residuals (important mainly for small samples).
  • No severe multicollinearity (variance inflation factors below about 5 to 10) and no overly influential outliers.

Key numbers to look at

  • R2 and adjusted R2: variance explained.
  • Overall F test with its degrees of freedom.
  • Unstandardised b (change in outcome per unit change in predictor), standardised β, 95% CI and p.
  • VIF for multicollinearity and residual diagnostics.

Effect size

R2 ≈ .02 small, .13 medium, .26 large (Cohen, 1988). For single predictors report b or β with its confidence interval.

Benchmarks such as small, medium and large are conventions (Cohen, 1988), not rules. Interpret size in the context of your field.

Reporting Linear Regression in APA7 style

Template

The regression model was statistically significant, F(df1, df2) = XX.XX, p < .001, R2 = .XX. Study hours significantly predicted exam scores, b = X.XX, 95% CI [X.XX, X.XX], β = .XX, p < .001.
Put all coefficients in a table with columns b, SE, β, 95% CI and p.

Worked example (simulated data)

The numbers below were computed from the example CSV above, so you can reproduce them. They illustrate the format and are not real findings.

The regression model was statistically significant, F(2, 97) = 38.66, p < .001, R2 = .44, adjusted R2 = .43. Study hours significantly predicted exam score, b = 1.67, 95% CI [1.29, 2.05], β = .66, p < .001; sleep hours did not, b = 0.45, 95% CI [−0.73, 1.62], β = .06, p = .454.
PredictorbSEβ95% CIp
Intercept48.464.79—[38.95, 57.97]< .001
study hours1.670.19.66[1.29, 2.05]< .001
sleep hours0.450.59.06[−0.73, 1.62].454

APA7 reminders: italicise statistical symbols (M, SD, t, F, p, r), report exact p-values to two or three decimals (use p < .001 for very small values), omit the leading zero for values that cannot exceed 1 (.45, not 0.45), and put degrees of freedom in parentheses. See the APA7 cheat sheet.

Common mistakes

  • Reading β as a causal effect.
  • Not checking the residuals.
  • Dropping predictors one by one until everything is significant (this inflates false positives).

Not sure which analysis you need? Use the test chooser.

Frequently asked questions

What is the difference between b and β?

b is in the original units of the variables. β is standardised, so coefficients can be compared across predictors measured on different scales.

How big a sample do I need?

As a starting point, 10–20 cases per predictor, but a power analysis based on the expected effect size is better.

References

American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.

This guide is for learning and for preparing results for your own reports. You remain responsible for choosing an appropriate analysis, checking its assumptions and interpreting the results. Follow the formatting rules of your journal or institution where they differ from APA7.