pre-and-postprocess: Generic functions for transforming scalar-on-function...

Description Usage Arguments Value Author(s) See Also Examples

Description

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).

Usage

1
2
3
4
Data2wd(y, xfuncs, covt = NULL, min.scale = 0, nfeatures = NULL, filter.number = 10,
 wavelet.family = "DaubLeAsymm")

wd2fhat(est, info)

Arguments

y, xfuncs, covt, min.scale, nfeatures, filter.number, wavelet.family

see wnet.

est

an estimate produced by regressing on the wavelet-transformed predictors.

info

the wavelet infomation, output from Data2wd.

Value

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.

Author(s)

Lan Huo lan.huo@nyumc.org and Philip Reiss phil.reiss@nyumc.org

See Also

wd

Examples

1
2
3
4
5
6
7
# MCP-penalized regression via ncvreg (which can also apply a SCAD penalty)
data(gasoline)
res <- Data2wd(gasoline$octane, xfuncs = gasoline$NIR[,1:256])
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)

refunders/refund.wave documentation built on May 27, 2019, 4:05 a.m.