1. Home
2. Regression and generalized linear models

Regression and generalized linear models

Genstat provides directives for carrying out linear and nonlinear regression, also generalized linear, generalized additive and generalized nonlinear models. They are designed to allow easy comparison between models, and comparison between groups of data (specified as factors). The directives for nonlinear regression can also be used for general optimization. There are three preliminary directives for defining the form of model to be fitted, of which the `MODEL` directive must always be given first:

    `MODEL` defines the response variate(s) and the type of model to be fitted specifies a maximal model, containing all terms to be used in subsequent regression models controls iterative fitting of generalized linear models, generalized additive models and nonlinear models, and specifies parameters and bounds for nonlinear models

Separate directives carry out the fitting of the various types of model:

    `FIT` fits a linear model, a generalized linear model, a generalized additive model, or a generalized nonlinear model fits a standard nonlinear regression model fits a user-defined nonlinear regression model or optimizes a scalar function

Further directives are provided to allow sequential modification of the set of explanatory variables:

    `ADD` adds extra terms to any type of regression model drops terms from any type of regression model adds terms to, or drops them from, any type of regression model displays results of single-term changes to a linear or generalized linear model selects terms to include in or exclude from a linear or generalized linear model

The results of fitting the models can be displayed or stored in data structures:

    `RDISPLAY` displays the fit of any type of regression model stores the results from any type of regression model saves estimates and other information about individual terms in a regression analysis forms predictions from a linear or generalized linear model estimates functions of parameters of a regression model puts results from a regression, generalized linear or nonlinear model into Genstat spreadsheets

Procedure in the Library relevant to regression analysis include:

    `RCHECK` checks the fit of a regression model draws a graph to display the fit of a regression model plots one- or two-way tables of regression estimates does random permutation and exact tests for regression or generalized-linear-model analyses calculates the power (probability of detection) for regression models calculates comparison contrasts amongst the levels of a factor classifying a table of regression means retrieves a regression save structure from an external file stores a regression save structure in an external file calculates comparison contrasts within a multi-way table of means calculates Wald and F tests for dropping terms from a regression fits the same regression model to several response variates, and collates the output calculates effective standard errors that give good approximate sed’s calculates least significant intervals plots least significant intervals performs pairwise multiple comparison tests within a table of predictions displays a regression tree constructs a regression tree makes predictions using a regression tree forms values for nodes of a regression tree calculates Most Probable Numbers from dilution series data creates a separation plot for visualising the fit of a model with a dichotomous (i.e. binary) or polytomous (i.e. multi-categorical) outcome fits models to overdispersed proportions calculates effective doses or relative potencies fits regression models one term at a time (useful for obtaining an accumulated analysis of deviance table containing the contributions of individual terms in a generalized linear model) fits generalized linear models with multinomial distribution fits models to longitudinal data by generalized estimating equations analyses non-standard generalized linear models fits a generalized linear mixed model displays further output from a `GLMM` analysis saves results from a `GLMM` analysis does random permutation tests for generalized linear mixed models. plots residuals from a `GLMM` analysis forms predictions from a `GLMM` analysis calculates likelihood tests to assess random terms in a generalized linear mixed model analyses data using a hierarchical generalized linear model (HGLM) or a double hierarchical generalized linear model (DHGLM) displays results from an HGLM or DHGLM adds random terms into the dispersion models of an HGLM, so that the whole model becomes a DHGLM defines the fixed model for an HGLM or DHGLM calculates likelihood tests for fixed terms in a hierarchical generalized linear model draws a graph to display the fit of an HGLM or DHGLM analysis saves information from an HGLM or DHGLM analysis defines nonlinear parameters for the fixed model of an HGLM produces model-checking plots for an HGLM or DHGLM forms predictions from an HGLM or DHGLM analysis defines the random model for an HGLM calculates likelihood tests for random terms in a hierarchical generalized linear model displays the current HGLM model definitions prints or saves Wald tests for fixed terms in an HGLM estimates implicit and/or explicit functions of parameters does regressions for single-channel microarray data finds the minimum of a function calculated by a procedure finds the minimum of a function in one dimension fits the Michaelis-Menten equation for substrate concentration versus time data predicts the Michaelis-Menten curve for a particular set of parameter values fits curves with an AR1 or a power-distance correlation model performs t-tests for pairwise differences displays results of t-tests for pairwise differences in compact diagrams fits probit models allowing for natural mortality and immunity fits zero-inflated regression models to count data with excess zeros saves information from models fitted by `R0INFLATED` fits regressions with an AR1 or a power-distance correlation model fits the Bradley-Terry model for paired-comparison preference tests performs a Cate-Nelson graphical analysis of bivariate data does circular regression of mean direction for an angular response performs Finlay and Wilkinson’s joint regression analysis of genotype-by-environment data produces ridge regression and principal component regression analyses does logistic ridge regression performs lasso using iteratively reweighted least-squares fits and plots quantile regressions for linear models fits and plots quantile regressions for nonlinear models fits and plots quantile regressions for loess or spline models fits a linear functional relationship model fits a model where different units follow different generalized linear models fits a negative binomial generalized linear model estimating the aggregation parameter fits a generalized linear model with nonnegativity constraints (synonym `FITNONNEGATIVE`) gives t-tests for all pairwise differences of means from linear or generalized linear models carries out analysis of parallelism for nonlinear functions (synonym `FITPARALLEL`) fits a quadratic surface and estimates its stationary point fits a general four-parameter growth model to a non-decreasing response variate (synonym `FITSCHNUTE`) performs screening tests for generalized or multivariate linear models searches through models for a regression or generalized linear model (with methods including all-subsets, forward and backward stepwise regression) fits two-straight-line (broken-stick) models to data searches for the minimum of a function using the Nelder-Mead algorithm fits generalized linear models to survey data fits models for Wadley’s problem, allowing alternative links and errors performs analyses of categorical data from crossover trials estimates the parameter lambda of a single parameter transformation

Updated on May 9, 2022