## S3 method for class 'peer.smooth.spec':
smooth.construct(object, data, knots)
peer.smooth.spec
object, usually generated by a
term s(x, bs="peer")
; see Details.by
variable)
required by this term, with names corresponding to object$term
(and object$by
). Only the first element of this list is used.smooth.construct
."peer.smooth"
. See
smooth.construct
for the elements that this object will
contain.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:
xt$pentype=="RIDGE"
for a ridge penalty, the defaultxt$pentype=="D"
for a difference penalty. The order of the
difference penalty is specified by them
argument ofs()
.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 ofQ
must 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.xt$pentype=="USER"
for a user-specified penalty matrix$L$, supplied byxt$L
.peer