Learn R Programming

scam (version 1.0)

gcv.ubre_grad: The GCV/UBRE score value and its gradient

Description

For the estimation of the SCAM smoothing parameters the GCV/UBRE score is optimized outer to the Newton-Raphson procedure of the model fitting. This function returns the value of the GCV/UBRE score and calculates its first derivative with respect to the log smoothing parameter using the method of Wood (2009). The function is not normally called directly, but rather service routines for bfgs_gcv.ubre.

Usage

gcv.ubre_grad(rho, G, gamma, ee, eb, esp, SVD=TRUE, 
                             check.analytical, del)

Arguments

rho
log of the initial values of the smoothing parameters.
G
a list of items needed to fit a SCAM.
gamma
A constant multiplier to inflate the model degrees of freedom in the GCV or UBRE/AIC score.
ee
Get the enviroment for the model coefficients.
eb
Get the enviroment for the model coefficients derivatives.
esp
Get the enviroment for the smoothing parameter.
SVD
If TRUE then svd is applied to the augmented working model matrix, if SVD is FALSE then qr decomposition will be used (not recommended).
check.analytical
If this is TRUE then finite difference derivatives of GCV/UBRE score will be calculated, otherwise NULL.
del
A positive scalar (default is 1e-4) giving an increment for finite difference approximation when check.analytical=TRUE, otherwise NULL.

Value

  • A list is returned with the following items:
  • dgcv.ubreThe value of GCV/UBRE gradient.
  • gcv.ubreThe GCV/UBRE score value.
  • scale.estThe value of the scale estimate.
  • objectThe elements of the fitting procedure monogam.fit for a given value of the smoothing parameter.
  • dgcv.ubre.checkIf check.analytical=TRUE this returns the finite-difference approximation of the gradient.
  • check.gradIf check.analytical=TRUE this returns the relative difference (in and finite differenced derivatives.

References

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press. Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society: Series B. 73(1): 1--34

See Also

scam, bfgs_gcv.ubre