Description Usage Arguments Details Value See Also
This is a user friendly method to compute predictions from GeDS objects.
1 2 3 |
object |
the |
newdata |
an optional |
type |
character string indicating the type of prediction required.
By default it is equal to |
n |
integer value (2, 3 or 4) specifying the order (= degree + 1) of the GeDS fit
whose predicted values should be computed.
By default equal to |
... |
potentially further arguments (required by the definition of the generic function.). They are ignored, but with a warning. |
This is a method for the function predict
that
allows the user to handle GeDS-Class
objects.
In analogy with the function predict.glm
in the stats package,
the user can specify the scale on
which the predictions should be computed through the argument type
.
If the predictions are required to be on the scale of the response variable, the user should set
type = "response"
, which is the default. Alternatively
if one wants the predictions to be on the predictor scale, it is necessary to set type = "link"
.
By specifying type = "terms"
, it is possible to inspect the predicted values
separately for each single independent variable which enter either the GeD spline
component or the parametric component of the predictor model.
In this case the returned result is a matrix whose columns correspond to the terms supplied
via newdata
or extracted from the object
.
As GeDS objects contain three different fits (linear, quadratic and cubic), it is possible
to specify the order
for which GeDS predictions are required via the input argument n
.
A numeric vector corresponding to the predicted values (if type = "link"
or
type = "response"
). If type = "terms"
a numeric matrix with a column per term.
predict
for the standard definition; GGeDS
for examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.