lgspline0.3.0 package

Lagrangian Multiplier Smoothing Splines for Smooth Function Estimation

damped_newton_r

Damped Newton-Raphson Parameter Optimization

Details

Lagrangian Multiplier Smoothing Splines: Mathematical Details

get_2ndDerivPenalty

Compute Integrated Squared Second Derivative Penalty Matrix for Smooth...

get_B

Get Constrained GLM Coefficient Estimates

get_centers

Get Centers for Partitioning

get_interaction_patterns

Generate Interaction Variable Patterns

lgspline-package

Lagrangian Multiplier Smoothing Splines

lgspline.fit

Low-Level Fitting for Lagrangian Smoothing Splines

matinvsqrt

Calculate Matrix Inverse Square Root

AGAmult_wrapper

Efficient Matrix Multiplication for $\textbf{A}^{T}\textbf{G}\textbf{A...

approx_grad

Finite-difference Gradient Computer

armaInv

Matrix Inversion using Armadillo

compute_trace_UGXX_wrapper

Calculate Trace of Matrix Product $\text{trace}(\textbf{X}\textbf{U}\t...

create_block_diagonal

Create Block Diagonal Matrix

create_onehot

Create One-Hot Encoded Matrix

coef.lgspline

Extract model coefficients

collapse_block_diagonal

Collapse Matrix List into a Single Block-Diagonal Matrix

compute_dG_dlambda

Compute Derivative of Penalty Matrix G with Respect to Lambda

compute_dG_u_dlambda_xy

Compute Derivative of UGXTy\textbf{U}\textbf{G}\textbf{X}^{T}\textbf{y} w...

compute_dGhalf

Compute Matrix Square Root Derivative

tune_Lambda

Tune Smoothing and Ridge Penalties via Generalized Cross Validation

compute_dW_dlambda_wrapper

Compute Derivative of Penalty Matrix G with Respect to Lambda (Wrapper...

compute_G_eigen

Compute Eigenvalues and Related Matrices for G

compute_GhalfXy_temp_wrapper

Compute Component $\textbf{G}^{1/2}\textbf{A}(\textbf{A}^{T}\textbf{G}...

compute_gram_block_diagonal

Compute Gram Matrix for Block Diagonal Structure

compute_Lambda

Construct Smoothing Spline Penalty Matrix

efficient_bfgs

BFGS Implementation for REML Parameter Estimation

efficient_matrix_mult

Efficient Matrix Multiplication

expgrid

Generate Grid Indices Without expand.grid()

find_extremum

Find Extremum of Fitted Lagrangian Multiplier Smoothing Spline

find_neighbors

Find Neighboring Cluster Partitions Using Midpoint Distance Criterion

GAmult_wrapper

Efficient Matrix Multiplication of G and A Matrices

generate_posterior

Generate Posterior Samples from Fitted Lagrangian Multiplier Smoothing...

get_2ndDerivPenalty_wrapper

Wrapper for Smoothing Spline Penalty Computation

get_polynomial_expansions

Generate Design Matrix with Polynomial and Interaction Terms

get_U

Efficiently Construct U Matrix

gramMatrix

Compute Gram Matrix

grapes-times-times-grapes

Efficient Matrix Multiplication Operator

invert

Matrix Inversion with Fallback Methods

is_binary

Test if Vector is Binary

knot_expand_list

Expand Matrix into Partition Lists Based on Knot Boundaries

leave_one_out

Compute Leave-One-Out Cross-Validated predictions for Gaussian Respons...

lgspline-methods

lgspline: Lagrangian Multiplier Smoothing Splines

lgspline

Fit Lagrangian Multiplier Smoothing Splines

loglik_weibull

Compute Log-Likelihood for Weibull Accelerated Failure Time Model

make_constraint_matrix

Create Smoothing Spline Constraint Matrix

make_derivative_matrix

Compute First and Second Derivative Matrices

make_partitions

Create Data Partitions Using Clustering

matmult_block_diagonal

Multiply Block Diagonal Matrices in Parallel

matmult_U

Left-Multiply a List of Block-Diagonal Matrices by U

matsqrt

Calculate Matrix Square Root

nr_iterate

Compute Newton-Raphson Parameter Update with Numerical Stabilization

plot.lgspline

Plot Method for Lagrangian Multiplier Smoothing Spline Models

predict.lgspline

Predict Method for Fitted Lagrangian Multiplier Smoothing Spline

print.lgspline

Print Method for lgspline Objects

print.summary.lgspline

Print Method for lgspline Object Summaries

prior_loglik

Log-Prior Distribution Evaluation for lgspline Models

softplus

Compute softplus transform

std

Standardize Vector to Z-Scores

summary.lgspline

Summary method for lgspline Objects

take_derivative

Calculate Derivatives of Polynomial Terms

take_interaction_2ndderivative

Calculate Second Derivatives of Interaction Terms

unconstrained_fit_default

Unconstrained Generalized Linear Model Estimation

unconstrained_fit_weibull

Unconstrained Weibull Accelerated Failure Time Model Estimation

vectorproduct_block_diagonal

Vector-Matrix Multiplication for Block Diagonal Matrices

wald_univariate

Univariate Wald Tests and Confidence Intervals for Lagrangian Multipli...

weibull_dispersion_function

Estimate Weibull Dispersion for Accelerated Failure Time Model

weibull_family

Weibull Family for Survival Model Specification

weibull_glm_weight_function

Weibull GLM Weight Function for Constructing Information Matrix

weibull_qp_score_function

Compute gradient of log-likelihood of Weibull accelerated failure mode...

weibull_scale

Estimate Scale for Weibull Accelerated Failure Time Model

weibull_shur_correction

Correction for the Variance-Covariance Matrix for Uncertainty in Scale

Implements Lagrangian multiplier smoothing splines for flexible nonparametric regression and function estimation. Provides tools for fitting, prediction, and inference using a constrained optimization approach to enforce smoothness. Supports generalized linear models, Weibull accelerated failure time (AFT) models, quadratic programming problems, and customizable arbitrary correlation structures. Options for fitting in parallel are provided. The method builds upon the framework described by Ezhov et al. (2018) <doi:10.1515/jag-2017-0029> using Lagrangian multipliers to fit cubic splines. For more information on correlation structure estimation, see Searle et al. (2009) <ISBN:978-0470009598>. For quadratic programming and constrained optimization in general, see Nocedal & Wright (2006) <doi:10.1007/978-0-387-40065-5>. For a comprehensive background on smoothing splines, see Wahba (1990) <doi:10.1137/1.9781611970128> and Wood (2006) <ISBN:978-1584884743> "Generalized Additive Models: An Introduction with R".

  • Maintainer: Matthew Davis
  • License: MIT + file LICENSE
  • Last published: 2025-11-18