formula.GeDS {GeDS} | R Documentation |
Formula for the predictor model
Description
A description of the structure of a predictor model to be fitted using
NGeDS
and/or GGeDS
and how this information can
be extracted from a GeDS-class
object.
Usage
## S3 method for class 'GeDS'
formula(x, ...)
Arguments
x |
Fitted |
... |
Unused in this case. |
Details
In the GeDS GNM (GLM) regression, implemented in NGeDS
and
GGeDS
, it is assumed that the mean of the response variable
transformed using an appropriate link function is modelled through a possibly
multivariate predictor model involving two components: a GeD variable knot
spline regression component involving up to two of the independent variables
and a parametric component with respect to the remaining independent
variables. The formula is used to specify the structure of such a possibly
multivariate predictor model.
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 means 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 just linearly.
In the current version of the package, GGeDS
is univariate,
therefore only one covariate which enters the spline regression component can
be specified.
In contrast, the function NGeDS
, generates also 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
modelled 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
.