Binary logistic regression

MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.

Dataset

  • mtcars (am, wt, hp) — 32 cars from the 1974 Motor Trend road tests: transmission (am: 0 automatic, 1 manual), weight (wt, 1000 lb) and gross horsepower (hp) (R: datasets::mtcars).
  • Data file (the same format serves MinutePlot and R): mtcars_am_wt_hp.csv — one column per variable; paste it into the app, and keep it in the R script’s folder.
  • R built-in: the script uses mtcars.

Setup

In MinutePlot:

  • Workbench → Binary logistic regression → paste mtcars_am_wt_hp.csv → Preview data → tick first column is sample names (the car column) → outcome column am, predictors wt and hp → ConfirmFit logistic model.

In R:

  • Base R only; then run mtcars_logistic.R top 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:

  • Binary logistic regression of am on wt and hp (maximum likelihood, MinutePlot’s iteratively reweighted least squares). R reference: glm(am ~ wt + hp, family = binomial).
  • Coefficients on the log-odds scale with standard errors and two-sided Wald p-values; the fit summary as MinutePlot reports it: residual deviance (−2 log-likelihood), null deviance, AIC, log-likelihood, McFadden’s pseudo-R² and the likelihood-ratio test of the model.

Side-by-side results

Coefficients (log-odds)

MinutePlot®

TermEstimateSEp
(Intercept)18.86637.44360.0113
wt-8.08353.06870.0084
hp0.03630.01770.0409

R

TermEstimateSEp
(Intercept)18.86637.44360.0113
wt-8.08353.06870.0084
hp0.03630.01770.0409

R values: verified in R 4.5.2 (see the verdict).

Fit summary

MinutePlot®

Residual devianceNull devianceAICLog-likelihoodMcFadden R²LR-test p
10.05943.23016.059-5.0300.7673< 0.0001

R

Residual devianceNull devianceAICLog-likelihoodMcFadden R²LR-test p
10.05943.23016.059-5.0300.7673< 0.0001

R values: verified in R 4.5.2 (see the verdict).

Verdict

Coefficients 18.8663, −8.0835, 0.0363 with SE 7.4436, 3.0687, 0.0177 and residual deviance 10.059, null deviance 43.230, AIC 16.059 -- identical to R’s glm(am ~ wt + hp, family = binomial); McFadden’s R² derived from R’s log-likelihoods.

R script

mtcars_logistic.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.