This function calculates the finite-difference approximation of the GCV/UBRE gradient for the fitted model and compares it with the analytical gradient.
check.analytical(object, data, del=1e-6,control)
A fitted scam
object.
An original data frame or list containing the model response variable and covariates.
A positive scalar (default is 1e-6) giving an increment for finite difference approximation.
Control option list as returned by scam.control
.
A list is returned with the following items:
The finite-difference approximation of the gradient.
The relative difference in percentage between the analytical and finite differenced derivatives.