Skip to content

Advanced Regression

Many regression families plus diagnostics, interactions, robust SEs, and model comparison.

On this page
Narrated walkthrough: the guide that picks a model family, then a negative binomial model of doctor visits on the health and lifestyle sample, with key findings, tables for a paper, charts and diagnostics. Sample data.

Advanced Regression goes beyond the basic linear model with interaction builders, robust/clustered standard errors, influence diagnostics (Cook’s D, DFBETAs, leverage), and side-by-side model comparison with AIC/BIC and likelihood-ratio tests.

Generalized linear models#

  • Binary & categorical: logistic, probit, complementary log-log, ordinal, multinomial
  • Firth penalized logistic for separation and rare-event outcomes
  • Counts: Poisson, negative binomial, and zero-inflated Poisson / negative binomial
  • Rates and risk ratios: Poisson with an exposure, hurdle and zero-truncated counts, log-binomial and modified Poisson, with robust or cluster-robust standard errors
  • Limited outcomes: beta regression and fractional logit for proportions, conditional logistic for matched sets, partial proportional odds with the Brant test, and Tobit, truncated, interval and Heckman selection regression
  • Continuous-positive: Gamma and Tweedie, with predictive-margins curves

Mixed & multilevel models#

  • Linear mixed models (REML / ML) and binomial / Poisson GLMMs
  • Generalized estimating equations (GEE) for correlated data
  • Growth-curve models and intraclass correlation (ICC)
  • Bayesian linear mixed models
  • Three-level nested and crossed random intercepts, negative binomial and ordinal mixed models
  • Repeated measures: correlated residuals (AR(1), compound symmetry, unstructured) and MMRM with Satterthwaite degrees of freedom and the treatment effect at each visit

Robust & quantile regression#

  • M-estimators: Huber, Tukey biweight, Hampel, Andrew, RamsayE, trimmed mean
  • RANSAC and Theil-Sen for high-leverage contamination
  • Quantile regression across the conditional distribution
  • MM regression (high breakdown, 95% efficiency) and least trimmed squares with outlier flagging
  • Method comparison: Deming regression with jackknife intervals and Passing–Bablok regression with the cusum linearity test, each with a Bland–Altman analysis

Structural equation modelling#

  • Confirmatory factor analysis (CFA) with fit indices
  • Exploratory factor analysis (EFA)
  • Path analysis with direct, indirect and total effects
  • Mediation and moderation, including multiple-path models
  • Moderated mediation (PROCESS models 7 and 14) with the index of moderated mediation and bootstrap intervals
  • Measurement invariance across groups: configural, metric, scalar and strict, with partial scalar invariance when full scalar invariance fails
  • Latent growth curves and random-intercept cross-lagged panel models for repeated measurements
  • Latent class analysis of categorical items and latent profile analysis of numeric indicators, with BIC for the number of groups

Flexible & multivariate regression#

  • Generalized additive models (GAM) with penalised smooth curves chosen by REML, and multivariable fractional polynomials
  • Piecewise (segmented) regression with an estimated breakpoint and Davies’ test, and nonlinear least squares for named curves (logistic, Gompertz, Michaelis–Menten and others)
  • Partial least squares and principal components regression, with the number of components chosen by cross-validation
  • Multivariate regression with Pillai, Wilks, Hotelling–Lawley and Roy tests, and seemingly unrelated regressions (SUR)

Diagnostics & comparison#

  • Influence: Cook’s D, DFBETAs, leverage, multicollinearity (VIF), condition number
  • Residual & specification tests: Breusch-Pagan, Durbin-Watson, Ramsey RESET, Vuong
  • Robust and cluster-robust standard errors
  • Interaction builders with marginal-effect plots
  • Model comparison: AIC / BIC and likelihood-ratio tests
  • Box–Tidwell power transformations and bootstrap optimism-corrected validation of linear and logistic models
  • Dominance analysis of predictor importance and average marginal effects for linear, logistic and Poisson models

Write the model as a formula#

If you know R, open Write it as a formula above the column pickers on the GLM, Mixed Models, Robust, Flexible and Diagnostics tabs, type the model the way you would in R, and press Fill the pickers.

  • weight ~ age + sex: the outcome before the ~ and the predictors after it.
  • score ~ time + (1 | school): a random intercept for each school, on the Mixed Models tab. (1 | school/class) nests classes in schools, and (time | school) adds a random slope.
  • Column names with spaces go in backticks, for example `body mass`.

The formula only fills the pickers: you can see and change every choice before you run. A note says what was set and anything that could not be used, such as a column that is not in the dataset, or an interaction a tab cannot fit (its main effects are added).

A negative binomial model of doctor visits: key findings in words, the diet-quality rate ratio 0.843 (95% CI 0.764 to 0.930), fit statistics and the coefficient table. Sample data.
Something missing?

Have a question these docs don’t answer? Email support@nexmetry.org and we’ll add a guide.