MultiSpline: Spline-Based Nonlinear Modeling for Multilevel and Longitudinal Data

Provides a unified framework for fitting, predicting, and interpreting nonlinear relationships in single-level, multilevel, and longitudinal regression models. Flexible functional forms are supported using natural cubic splines ('splines'), B-splines ('splines'), and GAM smooths ('mgcv'). Supports two-way and nested clustering via 'lme4', automatic knot selection by AIC or BIC, multilevel R-squared decomposition (Nakagawa-Schielzeth marginal and conditional R-squared with level-specific variance partitioning), a postestimation suite returning first and second derivatives with confidence bands, turning points and inflection regions, and a model comparison workflow contrasting linear, polynomial, and spline fits by AIC, BIC, and likelihood-ratio tests. Cluster heterogeneity in nonlinear effects is supported via random-slope spline terms.

Version: 0.2.0
Depends: R (≥ 4.2.0)
Imports: stats, lme4, mgcv, dplyr, ggplot2, rlang, splines
Suggests: lmerTest, knitr, rmarkdown, reformulas, numDeriv
Published: 2026-04-16
DOI: 10.32614/CRAN.package.MultiSpline
Author: Subir Hait ORCID iD [aut, cre]
Maintainer: Subir Hait <haitsubi at msu.edu>
BugReports: https://github.com/causalfragility-lab/MultiSpline/issues
License: GPL-3
URL: https://github.com/causalfragility-lab/MultiSpline
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: MultiSpline results

Documentation:

Reference manual: MultiSpline.html , MultiSpline.pdf

Downloads:

Package source: MultiSpline_0.2.0.tar.gz
Windows binaries: r-devel: MultiSpline_0.2.0.zip, r-release: MultiSpline_0.1.1.zip, r-oldrel: MultiSpline_0.1.1.zip
macOS binaries: r-release (arm64): MultiSpline_0.1.1.tgz, r-oldrel (arm64): MultiSpline_0.1.1.tgz, r-release (x86_64): MultiSpline_0.1.1.tgz, r-oldrel (x86_64): MultiSpline_0.1.1.tgz
Old sources: MultiSpline archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=MultiSpline to link to this page.