spadd.presmth.Bspl: Fit the desparsified lasso presmoothing estimator with cubic...

View source: R/spaddinf.R

spadd.presmth.BsplR Documentation

Fit the desparsified lasso presmoothing estimator with cubic B-splines

Description

Fit the desparsified lasso presmoothing estimator with cubic B-splines

Usage

spadd.presmth.Bspl(X, Y, d.pre, lambda, eta, n.foi)

Arguments

X

the design matrix

Y

the response vector (centered)

d.pre

the number of intervals in which to divide the support of each covariate

lambda

the tuning parameter for fitting the group lasso estimate for the bias correction

eta

the tuning parameter for the group lasso projection of one set of basis functions onto those of the other covariates.

n.foi

the number of functions (first columns of X) for which to compute the desparsified lasso presmoothing estimator.

Value

a list with the fitted functions etc.

Examples

data <- data_gen(n = 200, q = 10, r = .5)

spadd.presmth.Bspl.out <- spadd.presmth.Bspl(X = data$X,
                                             Y = data$Y,
                                             d.pre = 20,
                                             lambda = 1,
                                             eta = 3,
                                             n.foi = 6)

plot_presmth_Bspl(spadd.presmth.Bspl.out,
                  true.functions = list( f = data$f,
                                         X = data$X))

gregorkb/spaddinf documentation built on Oct. 29, 2024, 3:17 p.m.