peer {refund} | R Documentation |
Construct a PEER regression term in a pfr
formula
Description
Defines a term \int_{T}\beta(t)X_i(t)dt
for inclusion in a
pfr
formula, where \beta(t)
is estimated with
structured penalties (Randolph et al., 2012).
Usage
peer(
X,
argvals = NULL,
pentype = "RIDGE",
Q = NULL,
phia = 10^3,
L = NULL,
...
)
Arguments
X |
functional predictors, typically expressed as an |
argvals |
indices of evaluation of |
pentype |
the type of penalty to apply, one of |
Q |
matrix |
phia |
scalar |
L |
user-supplied penalty matrix for |
... |
additional arguments to be passed to |
Details
peer
is a wrapper for lf
, which defines linear
functional predictors for any type of basis. It simply calls lf
with the appropriate options for the peer
basis and penalty construction.
The type of penalty is determined by the pentype
argument. There
are four types of penalties available:
-
pentype=="RIDGE"
for a ridge penalty, the default -
pentype=="D"
for a difference penalty. The order of the difference penalty may be specified by supplying anm
argument (default is 2). -
pentype=="DECOMP"
for a decomposition-based penalty,bP_Q + a(I-P_Q)
, whereP_Q = Q^t(QQ^t)^{-1}Q
. TheQ
matrix must be specified byQ
, and the scalara
byphia
. 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. -
pentype=="USER"
for a user-specified penalty matrix, supplied by theL
argument.
The original stand-alone implementation by Madan Gopal Kundu is available in
peer_old
.
Author(s)
Jonathan Gellar JGellar@mathematica-mpr.com and Madan Gopal Kundu mgkundu@iupui.edu
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.
Kundu, M. G., Harezlak, J., and Randolph, T. W. (2012). Longitudinal functional models with structured penalties (arXiv:1211.4763 [stat.AP]).
See Also
pfr
, smooth.construct.peer.smooth.spec
Examples
## Not run:
#------------------------------------------------------------------------
# Example 1: Estimation with D2 penalty
#------------------------------------------------------------------------
data(DTI)
DTI = DTI[which(DTI$case == 1),]
fit.D2 = pfr(pasat ~ peer(cca, pentype="D"), data=DTI)
plot(fit.D2)
#------------------------------------------------------------------------
# Example 2: Estimation with structured penalty (need structural
# information about regression function or predictor function)
#------------------------------------------------------------------------
data(PEER.Sim)
data(Q)
PEER.Sim1<- subset(PEER.Sim, t==0)
# Setting k to max possible value
fit.decomp <- pfr(Y ~ peer(W, pentype="Decomp", Q=Q, k=99), data=PEER.Sim1)
plot(fit.decomp)
## End(Not run)