Learn R Programming

refund (version 0.1-1)

smooth.construct.peer.smooth.spec: Basis constructor for PEER terms

Description

Smooth basis constructor to define structured penalties (Randolph et al., 2012) for smooth terms.

Usage

## S3 method for class 'peer.smooth.spec':
smooth.construct(object, data, knots)

Arguments

object
a peer.smooth.spec object, usually generated by a term s(x, bs="peer"); see Details.
data
a list containing the data (including any by variable) required by this term, with names corresponding to object$term (and object$by). Only the first element of this list is used.
knots
not used, but required by the generic smooth.construct.

Value

  • An object of class "peer.smooth". See smooth.construct for the elements that this object will contain.

Details

The smooth specification object, defined using s(), should contain an xt element. xt will be a list that contains additional information needed to specify the penalty. The type of penalty is indicated by xt$pentype. There are four types of penalties available:
  1. xt$pentype=="RIDGE"for a ridge penalty, the default
  2. xt$pentype=="D"for a difference penalty. The order of the difference penalty is specified by themargument ofs().
  3. xt$pentype=="DECOMP"for a decomposition-based penalty,$bP_Q + a(I-P_Q)$, where$P_Q = Q^t(QQ^t)^{-1}Q$. The$Q$matrix must be specified byxt$Q, and the scalar$a$byxt$phia. The number of columns ofQmust be equal to the length of the data. Each row represents a basis function where the functional predictor is expected to lie, according to prior belief.
  4. xt$pentype=="USER"for a user-specified penalty matrix$L$, supplied byxt$L.

References

Randolph, T. W., Harezlak, J, and Feng, Z. (2012). Structured penalties for functional linear models - partially empirical eigenvectors for regression. Electronic Journal of Statistics, 6, 323-353.

See Also

peer