GLM
GLM
The GLM node fits a generalized linear model to your data using either base R glm() or glmmTMB() and displays output derived from summary().
What it does
- Fits a generalized linear model using R formula syntax
- Lets you choose between the default
glm()engine and advancedglmmTMB() - Requires you to choose an error distribution family before running
- Displays coefficient estimates, standard errors, test statistics, and p-values from the model summary
- Optionally stores the fitted model for downstream use
How to use it
- Connect a data source - drag an edge from an Input CSV node to this node’s input handle
- Choose a model engine - select
glm (default)for base R models orglmmTMB (advanced)for the extended family set - Choose an error family - with
glm, use poisson, binomial, or gaussian; withglmmTMB, you can also use negative binomial and tweedie - Enter a formula - type an R formula in the format
response ~ predictor(for examplecount ~ treatment) - Optionally enable model output - tick the checkbox if you want to save the fitted model to storr
- Click Run - the model is fitted on the server and the summary output is shown
Configuration
| Setting | Required | Description |
|---|---|---|
| Upstream connection | Yes | A node providing data |
| Model engine | Yes | Choose glm (default) for base R or glmmTMB (advanced) for extended families |
| Error distribution family | Yes | glm: poisson, binomial, gaussian. glmmTMB: poisson, binomial, gaussian, negative binomial, tweedie |
| Formula | Yes | R formula (for example count ~ treatment) |
| Output to storr | No | Store the fitted model for downstream use |
| Model name | Conditional | Optional override for the stored model name; defaults to the input dataframe name suffixed with _glm |
| Comment | No | Annotation for generated R code |
Output
The GLM node always shows summary-based output.
- Model fit details - family and summary statistics such as AIC, BIC, log-likelihood, deviance, residual degrees of freedom, and sigma when available
- Coefficients table - Term, Estimate, Std. Error, test statistic, and p-value
Generated R code
my_data_glm <- glm(count ~ treatment, data=my_data, family=poisson)
summary(my_data_glm)Advanced mode with negative binomial uses glmmTMB() and nbinom2:
library(glmmTMB)
my_data_glm <- glmmTMB(count ~ treatment, data=my_data, family=nbinom2)
summary(my_data_glm)Tips
- The node does not offer ANOVA output modes; it always uses
summary()output negative binomialandtweedieare available only when the engine is set toglmmTMB (advanced)- The UI label negative binomial is implemented as
nbinom2in generatedglmmTMBcode - Variable names in the formula must match the connected dataset columns exactly
- If the backend does not have the
glmmTMBpackage installed, only advanced mode will fail; defaultglmmode does not require it