causalfragility-lab/MultiSpline: MultiSpline 0.2.0

Read full text
Authors: causalfragility-lab
Cited by: 0

Abstract

MultiSpline 0.2.0 Now on CRAN — install.packages("MultiSpline") This is a major update adding a complete estimation, interpretation, and diagnostic framework for nonlinear multilevel spline modeling in R. All v0.1.0 function calls remain valid without modification. What's new Cross-classified and nested multilevel structures Supply two cluster variables and choose cross-classified or nested random effects: # Cross-classified nl_fit(data = df, y = "score", x = "age", cluster = c("school_id", "student_id"), nested = FALSE) # Nested (higher-level grouping first) nl_fit(data = df, y = "score", x = "age", cluster = c("school_id", "student_id"), nested = TRUE) Automatic knot / df selection # Standalone diagnostic nl_knots(data = df, y = "score", x = "age", df_range = 2:8) # Or inside nl_fit nl_fit(data = df, y = "score", x = "age", df = "auto") Multilevel R-squared decomposition nl_r2(fit) # Returns marginal R2m, conditional R2c, and a full variance # partition table (r2_mlm style) across all random-effect levels Derivative-based interpretation deriv

Fields of Study & Subjects

Statistical Methods and Bayesian Inference Data Analysis with R Spatial and Panel Data Analysis

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
27 February 2026
Language
EN