Learn R Programming

pgam (version 0.3.3)

pgam.smooth: Smoothing of nonparametric terms

Description

Interface for smoothing functions

Usage

pgam.smooth(y, x, df, fx, smoother = "spline", w = rep(1, length(y)))

Arguments

y
dependent variable for fitting. In semiparametric models, this is the partial residuals of parametric fit
x
independent variable. Univariate fit only
df
equivalent degrees of freedom
fx
if FALSE the smoothing parameter is chosen by cross-validation
smoother
string with the name of the smoother to be used
w
vector with the diagonal elements of the weight matrix. Default is a vector of $1$ with the same length of $y$

Value

  • fittedsmoothed values
  • levdiagonal of the influence matrix
  • dfdegrees of freedom

Details

Although several smoothers can be used in semiparametric regression models, only natural cubic splines is intended to be used in Poisson-Gamma Additive Models due to its interesting mathematical properties.

Nowadays, this function interface the smooth.spline in modreg library. It will become not dependent soon enough.

References

Green, P. J., Silverman, B. W. (1994) Nonparametric Regression and Generalized Linear Models: a roughness penalty approach. Chapman and Hall, London

Hastie, T. J., Tibshirani, R. J.(1990) Generalized Additive Models. Chapman and Hall, London

Junger, W. L. (2004) Modelo Poisson-Gama Semi-Param�trico: Uma Abordagem de Penaliza��o por Rugosidade. MSc Thesis. Rio de Janeiro, PUC-Rio, Departamento de Engenharia El�trica

See Also

pgam, predict.pgam