Learn R Programming

refund (version 0.1-5)

coef.pffr: Get estimated coefficients from a pffr

Description

Returns estimated coefficient functions/surfaces $\beta(t), \beta(s,t)$ and estimated smooth effects $f(z), f(x,z)$ or $f(x, z, t)$ and their standard errors. Not implemented for smooths in more than 3 dimensions.

Usage

## S3 method for class 'pffr':
coef(object, raw = FALSE, se = TRUE, freq
  = FALSE, n1 = 100, n2 = 40, n3 = 20, ...)

Arguments

object
a fitted pffr-object
raw
logical, defaults to FALSE. If TRUE, the function simply returns object$coefficients
se
logical, defaults to TRUE. Return estimated standard error of the estimates?
freq
logical, defaults to FALSE. If FALSE, use posterior variance object$Vp for variability estimates, else use object$Ve. See gamObject
n1, n2, n3
these parameters give the number of gridpoints for 1-/2-/3-dimensional smooth terms for the marginal equidistant grids over the range of the covariates at which the estimated effects are evaluated.
...
other arguments, not used.

Value

  • If raw==FALSE, a list containing
    • ptermsa matrix containing the parametric / non-functional coefficients (and, optionally, their se's)
    • smtermsa named list with one entry for each smooth term in the model. Each entry contains
      • coefa matrix giving the grid values over the covariates, the estimated effect (and, optionally, the se's). The first covariate varies the fastest.
      • x, y, zthe unique gridpoints used to evaluate the smooth/coefficient function/coefficient surface
      • xlim, ylim, zlimthe extent of the x/y/z-axes
      • xlab, ylab, zlabthe names of the covariates for the x/y/z-axes
      • dimthe dimensionality of the effect
      • mainthe label of the smooth term (a short label, same as the one used insummary.pffr)