peer | R Documentation |
pfr
formulaDefines 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).
peer(
X,
argvals = NULL,
pentype = "RIDGE",
Q = NULL,
phia = 10^3,
L = NULL,
...
)
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 |
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 an m
argument
(default is 2).
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 by Q
, and the scalar a
by
phia
. The number of columns of Q
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 the L
argument.
The original stand-alone implementation by Madan Gopal Kundu is available in
{peer_old}
.
Jonathan Gellar JGellar@mathematica-mpr.com and Madan Gopal Kundu mgkundu@iupui.edu
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]).
{pfr}
, {.smooth.spec}
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.