Learn R Programming

GeDS (version 0.3.3)

formula.GeDS: Formula for the Predictor Model

Description

A description of the structure of the predictor model fitted using NGeDS, GGeDS, NGeDSgam or NGeDSboost.

Usage

# S3 method for GeDS
formula(x, ...)

# S3 method for GeDSgam formula(x, ...)

# S3 method for GeDSboost formula(x, ...)

Arguments

x

Fitted "GeDS", "GeDSgam" or "GeDSboost" class object, produced by NGeDS, GGeDS, NGeDSgam or NGeDSboost from which the predictor model formula should be extracted.

...

Unused in this case.

Details

In GeDS GNM (GLM) regression (implemented through NGeDS and GGeDS) the mean of the response variable, correspondingly transformed through an appropriate link function, is modeled using a potentially multivariate predictor model. The latter comprises two components: a GeD variable-knot spline regression involving up to two of the independent variables and a parametric component for the remaining independent variables. The formula defines the structure of this potentially multivariate predictor.

The formulae that are input in NGeDS and GGeDS are similar to those input in lm or glm except that the function f should be specified in order to identify which of the covariates enter the GeD spline regression part of the predictor model. For example, if the predictor model is univariate and it links the transformed mean of y to x1, the predictor has only a GeD spline component and the formula should be in the form y ~ f(x1).

As noted, there may be additional independent variables x2, x3, ... which may enter linearly into the parametric component of the predictor model and not be part of the GeD spline regression component. For example one may use the formula y ~ f(x1) + x2 + x3 which assumes a spline regression only between the transformed mean of y and x1, while x2 and x3 enter the predictor model linearly.

Both NGeDS and GGeDS functions, generate bivariate GeDS regression models. Therefore, if the functional dependence of the mean of the response variable y on x1 and x2 needs to be jointly modeled and there are no other covariates, the formula for the corresponding two dimensional predictor model should be specified as y ~ f(x1,x2).

Within the argument formula, similarly as in other R functions, it is possible to specify one or more offset variables, i.e., known terms with fixed regression coefficients equal to 1. These terms should be identified via the function offset.

For NGeDSgam and NGeDSboost, more than one GeD spline component can be included in the formula, e.g., y ~ f(x1) + f(x2,x3) + x4, where f() denotes GeD spline-based (univariate or bivariate) regression smoothing functions/base-learners, and x4 is included as a linear term in the predictor model. Offset terms are not supported by NGeDSboost and will be ignored if included in the formula. Known additive components can instead be manually incorporated into the response variable prior to fitting the model.