spadd.presmth.Legr | R Documentation |
Fit the desparsified lasso presmoothing estimator with Legendre polynomials
spadd.presmth.Legr(X, Y, d.pre, lambda, eta, n.foi, K = 1)
X |
the design matrix |
Y |
the response vector |
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 |
K |
the order of the Legendre polynomials. E.g. |
a list with the fitted functions etc.
data <- data_gen(n = 100,q = 10,r = .5)
spadd.presmth.Legr.out <- spadd.presmth.Legr(X = data$X,
Y = data$Y,
d.pre = 10,
lambda = .1,
eta = 2,
n.foi = 6,
K = 1)
plot_presmth_Legr(x = spadd.presmth.Legr.out,
true.functions = list( f = data$f, X = data$X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.