Learn R Programming

scam (version 1.1-1)

check.analytical: Checking the analytical gradient of the GCV/UBRE score

Description

This function calculates the finite-difference approximation of the GCV/UBRE gradient for the fitted model and compares it with the analytical gradient.

Usage

check.analytical(object, data, del=1e-6)

Arguments

object
A fitted scam object.
data
An original data frame or list containing the model response variable and covariates.
del
A positive scalar (default is 1e-6) giving an increment for finite difference approximation.

Value

  • A list is returned with the following items:
  • dgcv.ubre.fdThe finite-difference approximation of the gradient.
  • check.gradThe relative difference in percentage between the analytical and finite differenced derivatives.

See Also

scam