Package: lgspline 1.1.0

lgspline: Lagrangian Multiplier Smoothing Splines for Smooth Function Estimation

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, Cox proportional hazards models, quadratic programming constraints, and customizable working-correlation structures, with options for parallel fitting. The core spline construction builds on Ezhov et al. (2018) <doi:10.1515/jag-2017-0029>. Quadratic-programming and SQP details follow Goldfarb & Idnani (1983) <doi:10.1007/BF02591962> and Nocedal & Wright (2006) <doi:10.1007/978-0-387-40065-5>. For smoothing spline and penalized spline background, see Wahba (1990) <doi:10.1137/1.9781611970128> and Wood (2017) <doi:10.1201/9781315370279>. For variance-component and correlation-parameter estimation, see Searle et al. (2006) <ISBN:978-0470009598>. The default multivariate partitioning step uses k-means clustering as in MacQueen (1967).

Authors:Matthew Davis [aut, cre]

lgspline_1.1.0.tar.gz
lgspline_1.1.0.zip(r-4.7)lgspline_1.1.0.zip(r-4.6)lgspline_1.1.0.zip(r-4.5)
lgspline_1.1.0.tgz(r-4.6-x86_64)lgspline_1.1.0.tgz(r-4.6-arm64)lgspline_1.1.0.tgz(r-4.5-x86_64)lgspline_1.1.0.tgz(r-4.5-arm64)
lgspline_1.1.0.tar.gz(r-4.7-arm64)lgspline_1.1.0.tar.gz(r-4.7-x86_64)lgspline_1.1.0.tar.gz(r-4.6-arm64)lgspline_1.1.0.tar.gz(r-4.6-x86_64)
lgspline_1.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
lgspline/json (API)
NEWS

# Install 'lgspline' in R:
install.packages('lgspline', repos = c('https://matthewlouisdavisbiostat.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/matthewlouisdavisbiostat/lgspline/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

biostatisticssmoothingsplinesopenblascpp

3.74 score 7 scripts 570 downloads 93 exports 67 dependencies

Last updated from:4a37d293f1. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK207
linux-devel-x86_64OK223
source / vignettesOK245
linux-release-arm64OK213
linux-release-x86_64OK209
macos-release-arm64OK160
macos-release-x86_64OK380
macos-oldrel-arm64OK163
macos-oldrel-x86_64OK260
windows-develOK230
windows-releaseOK226
windows-oldrelOK180
wasm-releaseOK142

Exports:%**%AGAmult_wrapperapprox_gradarmaInvblockfit_solvecollapse_block_diagonalcompute_dG_dlambdacompute_dG_u_dlambda_xycompute_dGhalfcompute_G_eigencompute_GhalfXy_temp_wrappercompute_gram_block_diagonalcompute_Lambdacompute_trace_Hcompute_trace_UGXX_wrappercox_dispersion_functioncox_familycox_glm_weight_functioncox_qp_score_functioncox_schur_correctioncreate_block_diagonalcreate_onehotdamped_newton_refficient_bfgsefficient_matrix_multequationexpgridfind_extremumfind_neighborsGAmult_wrappergenerate_posteriorgenerate_posterior_correlationget_2ndDerivPenaltyget_2ndDerivPenalty_wrapperget_Bget_centersget_interaction_patternsget_polynomial_expansionsget_UgramMatrixinfo_coxinfo_negbinintegrateinvertis_binaryknot_expand_listleave_one_outlgsplinelgspline_coxlgspline_negbinlgspline_weibulllgspline.fitloglik_coxloglik_negbinloglik_weibullmake_constraint_matrixmake_derivative_matrixmake_partitionsmatinvsqrtmatmult_block_diagonalmatmult_Umatsqrtnegbin_dispersion_functionnegbin_familynegbin_glm_weight_functionnegbin_qp_score_functionnegbin_schur_correctionnegbin_thetanr_iterateprior_loglikprocess_inputprocess_qpreml_grad_from_dVscore_coxscore_negbinsoftplusstdtake_derivativetake_interaction_2ndderivativetune_Lambdaunconstrained_fit_coxunconstrained_fit_defaultunconstrained_fit_negbinunconstrained_fit_weibullvectorproduct_block_diagonalwald_univariateweibull_dispersion_functionweibull_familyweibull_glm_weight_functionweibull_qp_score_functionweibull_scaleweibull_schur_correctionweibull_shur_correction

Dependencies:askpassbase64encbslibcachemclicpp11crosstalkcurldata.tabledigestdplyrevaluatefarverfastmapFNNfontawesomefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetshttrisobandjquerylibjsonliteknitrlabelinglaterlazyevallifecyclemagrittrmemoisemimeopensslotelpillarpkgconfigplotlypromisespurrrquadprogR6rappdirsRColorBrewerRcppRcppArmadillorlangrmarkdownS7sassscalesstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunyaml

Readme and manuals

Help Manual

Help pageTopics
Extract Coefficients from a Fitted lgsplinecoef.lgspline
Extract Coefficients from a wald_lgspline Objectcoef.wald_lgspline
Confidence Intervals for lgspline Coefficientsconfint.lgspline
Extract Confidence Intervals from a wald_lgspline Objectconfint.wald_lgspline
Cox PH Dispersion Functioncox_dispersion_function
Cox Proportional Hazards Family for lgsplinecox_family
Cox PH GLM Weight Functioncox_glm_weight_function
Cox Proportional Hazards Helpers for lgsplinecox_helpers
Cox PH Score Function for Quadratic Programming and Blockfitcox_qp_score_function
Cox PH Schur Correctioncox_schur_correction
Create One-Hot Encoded Matrixcreate_onehot
Lagrangian Multiplier Smoothing Splines: Mathematical DetailsDetails
Print Closed-Form Fitted Equation from lgspline Modelequation equation.lgspline print.equation
Find the Extremum of a Fitted lgsplinefind_extremum
Generate Posterior Samples from a Fitted lgsplinegenerate_posterior
Generate Posterior Samples Propagating Correlation Parameter Uncertaintygenerate_posterior_correlation
Verification Examples for get_Bget_B_verification_examples
Generic for Numerical Integrationintegrate integrate.default
Definite Integral of a Fitted lgsplineintegrate.lgspline
Compute Leave-One-Out Cross-Validated Predictions for Gaussian Response/Identity Link under Constraintleave_one_out
Fit Lagrangian Multiplier Smoothing Splineslgspline
Fit Cox Proportional Hazards Model via lgsplinelgspline_cox
Fit Negative Binomial Model via lgsplinelgspline_negbin
Fit Weibull Accelerated Failure Time Model via lgsplinelgspline_weibull
Compute Cox Partial Log-Likelihoodloglik_cox
Compute Negative Binomial Log-Likelihoodloglik_negbin
Compute Log-Likelihood for Weibull Accelerated Failure Time Modelloglik_weibull
Extract Log-Likelihood from a Fitted lgsplinelogLik.lgspline
Calculate Matrix Inverse Square Root for Symmetric Matricesmatinvsqrt
Calculate Matrix Square Root for Symmetric Matricesmatsqrt
NB Dispersion Functionnegbin_dispersion_function
Negative Binomial Family for lgsplinenegbin_family
NB GLM Weight Functionnegbin_glm_weight_function
Negative Binomial Regression Helpers for lgsplinenegbin_helpers
NB Score Function for Quadratic Programming and Blockfitnegbin_qp_score_function
NB Schur Correctionnegbin_schur_correction
Estimate Negative Binomial Shape Parameternegbin_theta
Plot Method for lgspline Objectsplot.lgspline
Plot Method for wald_lgspline Objectsplot.wald_lgspline
Predict Method for lgspline Objectspredict.lgspline
Print Method for lgspline Objectsprint.lgspline
Print Method for lgspline Summariesprint.summary.lgspline
Print Method for wald_lgspline Objectsprint.wald_lgspline
Log-Prior Distribution Evaluation for lgspline Modelsprior_loglik
Prepare Quadratic Programming Constraints for lgsplineprocess_qp
Evaluate the REML gradient with respect to a single correlation parameterreml_grad_from_dV
Standardize Vector to Z-Scoresstd
Summary Method for lgspline Objectssummary.lgspline
Summary Method for wald_lgspline Objectssummary.wald_lgspline
Univariate Wald Tests and Confidence Intervals for lgspline Coefficientswald_univariate
Estimate Weibull Dispersion for Accelerated Failure Time Modelweibull_dispersion_function
Weibull Family for Survival Model Specificationweibull_family
Weibull GLM Weight Function for Constructing Information Matrixweibull_glm_weight_function
Compute Gradient of Log-Likelihood of Weibull Accelerated Failure Modelweibull_qp_score_function
Estimate Scale for Weibull Accelerated Failure Time Modelweibull_scale
Correction for the Variance-Covariance Matrix for Uncertainty in Scaleweibull_schur_correction weibull_shur_correction