Run your own GAMs

Professional interface for Generalized Additive Models. Build, configure, and execute R-based statistical models in real-time.

Step 1: Import Data

Select Source Dataset
This tool supports simple GAM simulations only. For large datasets (> 3000 rows), please perform the analysis directly in R.
Page 1 of 1

Step 2: GAM Building Pipeline

Quick Guide:

For those familiar with mgcv GAM, you can configure the model settings as follows:

  • Set response (y) and predictors (x) in the [Variables & Term Tuning] box. To add or interaction terms, click "Add term" in their respective areas.
  • Set smooth function (f(x)), basis, and k for each predictor
  • Set global GAM parameters like 'family', 'link', 'method', etc. in the [Model Parameters] section (Section 2).
  • Detailed information for mgcv package can be found in the official documentation (Wood, 2023).
  • When all settings are finished, click the "Run GAM" button in the Step 3: Execution section.

* Please note that the time required will depend on data size and GAM options.

Variables & Term Tuning

Generated Formula:

Waiting for configuration...

Response (y):


Predictor: Main effect terms

Term: Class: f(x): Basis: k: Term formula:
Click "Add term" to configure term rows.

Predictor: Interaction terms

Pairs: Class: f(x): Basis: k: Term formula:
Click "Add term" to configure term rows.
Model Parameters

Computational efficiency: The default function in this app is bam(). Unlike gam(), which is also from the mgcv package, bam() is optimized for faster computation and lower memory usage, making it well-suited for applications dealing with large or complex data. You can change it to gam() if you want, but be aware that it may overload this app if you have a lot of data.

Training Data Subset

To run GAM only on specific category data, select the options below (data not included in the model will only be used for prediction).


Step 3: Execution

* Note: The time required for fitting will depend on your data size and selected GAM options.


Step 4: GAM Results

Model Output Analysis & Visualization

Model Summary:



          

Diagnostics:

Diagnostic Residual & Fit Diagnostics
Smooth Smooth Component Partial Effects

Prediction Results:

Page 1 of 1

Once you download the .rds file, you can load and inspect the results in R:

library(mgcv)

# Load the downloaded RDS file (replace '/your_directory/' with your actual path)
gam_result <- readRDS('/your_directory/gam_results_dataset.rds')

# Inspect exported objects
gam_result$gam_formula  # The used formula
gam_result$gam_model    # The fitted GAM/BAM object
gam_result$gam_pred     # Dataframe with predicted values

# Run diagnostics and view effects
mgcv::gam.check(gam_result$gam_model)
mgcv::plot.gam(gam_result$gam_model, pages = 1, residuals = TRUE, scale = 0, shade = TRUE)
🚀
New version available!

Refresh to apply the latest updates.