Learn R Programming

CHsharp (version 0.4)

SecondDerivativePenalty: A Roughness Penalty Based on the Squared Second Derivative

Description

A roughness penalty function based on squared second derivatives evaluated numerically. This is a possible template function for other types of penalties.

Usage

SecondDerivativePenalty(xgrid, a)

Arguments

xgrid
vector of length m, must be increasing
a
a function of one numeric variable

Value

a vector of second derivatives evaluated at the points of xgrid