StatLabStudent EditionUser guideGalleryFeaturesAbout

Scatterplots with fit lines and loess

Plots one scale variable against another, optionally by group, with a linear, quadratic or cubic fit line (and R²), a confidence band, or a loess smoother (50% of points, Epanechnikov kernel, as SPSS).

Menu: Graphs → More charts → Scatterplot (groups, fit lines, loess)…

When should I use it?

What are the assumptions?

How do I run it in StatLab?

  1. Choose X and Y.
  2. Optionally choose a group variable and a fit line.
  3. Choose a confidence band for the mean or for individual values.

How do I read the output?

OutputMeaning
PointsOne per case (hover for values; click to select the case).
Fit lineWith R² and equation; the band is the chosen confidence interval.

Worked example

On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:

PROC vizScatter /x=score /y=age /color='' /fit=linear /fitBy=total /ci=none /labelCases=NO.

Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.

What are common mistakes?

Open StatLab   All guide topics