predict.pffr | R Documentation |
Takes a fitted pffr
-object produced by pffr()
and produces
predictions given a new set of values for the model covariates or the original
values used for the model fit. Predictions can be accompanied by standard errors,
based on the posterior distribution of the model coefficients. This is a wrapper
function for predict.gam()
.
## S3 method for class 'pffr'
predict(object, newdata, reformat = TRUE, type = "link", se.fit = FALSE, ...)
object |
a fitted |
newdata |
A named list (or a |
reformat |
logical, defaults to TRUE. Should predictions be returned in matrix form (default) or
in the long vector shape returned by |
type |
see |
se.fit |
see |
... |
additional arguments passed on to |
Index variables (i.e., evaluation points) for the functional covariates are reused
from the fitted model object and cannot be supplied with newdata
.
Prediction is always for the entire index range of the responses as defined
in the original fit. If the original fit was performed on sparse or irregular,
non-gridded response data supplied via pffr
's ydata
-argument
and no newdata
was supplied, this function will
simply return fitted values for the original evaluation points of the response (in list form).
If the original fit was performed on sparse or irregular data and newdata
was
supplied, the function will return predictions on the grid of evaluation points given in
object$pffr$yind
.
If type == "lpmatrix"
, the design matrix for the supplied covariate values in long format.
If se == TRUE
, a list with entries fit
and se.fit
containing fits and standard errors, respectively.
If type == "terms"
or "iterms"
each of these lists is a list of matrices of the same dimension as the response for newdata
containing the linear predictor and its se for each term.
Fabian Scheipl
predict.gam()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.