Description Usage Arguments Value Author(s) See Also Examples
These two functions enable the user to transform the predictors to the wavelet domain (Data2wd
); apply his/her favorite high-dimensional regression method to the wavelet coefficients (see the example); and inverse-transform the result to obtain a coefficient function estimate in the original domain (wd2fhat
).
1 2 3 4 |
y, xfuncs, covt,
min.scale, nfeatures,
filter.number, wavelet.family |
see |
est |
an estimate produced by regressing on the wavelet-transformed predictors. |
info |
the wavelet infomation, output from |
Data2wd
returns a list with components:
X |
the design matrix, with columns of covariates and functional predictors converted to wavelet domain. |
info |
the infomation needed to reconstruct coefficient functions |
wd2fhat
returns the coefficient function. It could be a curve or a 2D/3D image.
Lan Huo and Philip Reiss phil.reiss@nyumc.org
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# MCP-penalized regression via ncvreg (which can also apply a SCAD penalty)
data(gasoline)
res <- Data2wd(gasoline$octane, xfuncs = gasoline$NIR[,1:256])
require(ncvreg)
obje = ncvreg::cv.ncvreg(res$X, gasoline$octane)
est = obje$fit$beta[,which.min(obje$cve)]
names(est) <- rownames(obje$fit$beta)
beta <- wd2fhat(est, res$info)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.