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
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
mgcvpackage 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.
Generated Formula:
Response (y):
Predictor: Main effect terms
Predictor: Interaction terms
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.
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 Summary:
Diagnostics:
Prediction Results:
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)