Regression results
Observed data, fitted curve, knots, and uncertainty
Residuals versus fitted
Normal Q–Q plot
Observed versus predicted
Residual histogram
First derivative
Second derivative
Basis functions
Data and model workspace
Calculations stay in your browser.
1. Enter or import data
| # | X | Y | Weight | Label | Include | Actions |
|---|
2. Choose a spline model
3. Configure knots
4. Smoothing, penalty, and numerical controls
5. Transformations and data handling
6. Shape and boundary constraints
7. Validation and model comparison
8. Display and diagnostic options
Formula used and operating guide
A spline model represents the fitted response as a weighted sum of basis functions. Penalized models minimize residual error plus a smoothness term:
How to use this calculator
- Enter paired X and Y values, paste spreadsheet columns, or upload a CSV file.
- Select a spline family and knot-placement method.
- Adjust smoothing, transformations, validation, constraints, and diagnostic controls.
- Fit the model, inspect the charts and tables, compare alternatives, and generate predictions.
- Export summary, observation, and prediction files for later work.
Core interpretation
Knots divide the X range into local polynomial regions. A cubic spline ordinarily keeps the fitted level, first derivative, and second derivative continuous at each knot. Natural cubic splines constrain boundary behavior, while B-splines provide a stable local basis. P-splines combine a rich B-spline basis with a difference penalty. Smaller penalty values follow the data more closely; larger values produce a smoother curve.
Use validation error rather than training fit alone when prediction matters. High training R² with much worse validation RMSE is a common sign of overfitting. Residuals should be centered around zero without a systematic curve, funnel, or long run of the same sign. Confidence bands describe uncertainty in the mean curve. Prediction bands are wider because they also include individual observation noise.