Linear and polynomial regression
MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.
Dataset
- cars — Speed (mph) and stopping distance (ft) of 50 cars (R: datasets::cars; Ezekiel 1930).
- Data file (the same format serves MinutePlot and R): cars.csv — one column per variable; paste it into the app, and keep it in the R script’s folder.
- R built-in: the script loads cars with data().
Setup
In MinutePlot:
- Workbench → Regression → paste cars.csv (speed, dist) → Preview data → Confirm → model Linear → Fit model; then model Polynomial, degree 2 → Fit model.
- No sample-name column, no groups.
In R:
- Base R only; then run
cars_regression.Rtop to bottom (source it, or paste it into the console) with the R data file in the same folder. - R 4.5.2 and the package versions in the page header; each script prints the versions it runs under.
The analysis:
- Linear: dist ~ speed, ordinary least squares. Polynomial: degree 2, dist ~ speed + speed² (MinutePlot offers degrees 2 and 3; degree 2 shown). R reference: lm.
- Two-sided p-values on the coefficients; R², adjusted R², residual standard error and the overall F-test as MinutePlot reports them.
Side-by-side results
Linear fit -- coefficients
MinutePlot®
| Term | Estimate | SE | p |
|---|---|---|---|
| (Intercept) | -17.5791 | 6.7584 | 0.0123 |
| speed | 3.9324 | 0.4155 | < 0.0001 |
R
| Term | Estimate | SE | p |
|---|---|---|---|
| (Intercept) | -17.5791 | 6.7584 | 0.0123 |
| speed | 3.9324 | 0.4155 | < 0.0001 |
R values: verified in R 4.5.2 (see the verdict).
Linear fit -- summary
MinutePlot®
| R² | Adj. R² | Residual SE | F | p |
|---|---|---|---|---|
| 0.6511 | 0.6438 | 15.380 | 89.567 | < 0.0001 |
R
| R² | Adj. R² | Residual SE | F | p |
|---|---|---|---|---|
| 0.6511 | 0.6438 | 15.380 | 89.570 | < 0.0001 |
R values: verified in R 4.5.2 (see the verdict).
Quadratic fit -- coefficients
MinutePlot®
| Term | Estimate | SE | p |
|---|---|---|---|
| (Intercept) | 2.4701 | 14.8172 | 0.8683 |
| speed | 0.9133 | 2.0342 | 0.6555 |
| speed^2 | 0.1000 | 0.0660 | 0.1364 |
R
| Term | Estimate | SE | p |
|---|---|---|---|
| (Intercept) | 2.4701 | 14.8172 | 0.8680 |
| speed | 0.9133 | 2.0342 | 0.6560 |
| speed² | 0.1000 | 0.0660 | 0.1360 |
R values: verified in R 4.5.2 (see the verdict).
Quadratic fit -- summary
MinutePlot®
| R² | Adj. R² | Residual SE | F | p |
|---|---|---|---|---|
| 0.6673 | 0.6532 | 15.176 | 47.141 | < 0.0001 |
R
| R² | Adj. R² | Residual SE | F | p |
|---|---|---|---|---|
| 0.6673 | 0.6532 | 15.180 | 47.140 | < 0.0001 |
R values: verified in R 4.5.2 (see the verdict).
Verdict
Linear: intercept −17.5791 (SE 6.7584), slope 3.9324 (0.4155), R² 0.6511, F 89.57 -- identical to R’s lm; quadratic: 2.4701, 0.9133, 0.1000 with R² 0.6673 and F 47.14 -- identical to R’s lm(dist ~ speed + I(speed^2)).
R script
cars_regression.R — each script loads its data, prints its versions and the R-side tables shown above, in page order; no plotting.
R values verified in R 4.5.2 (emmeans 2.0.4, multcomp 1.4-32, multcompView 0.1-12, ez 4.5.0, Hmisc 5.3.0, pls 2.9.0, drc 3.0-1, car 3.1-5) on 16–17 September 2026.