preresmth.Legr.Bspl: Fit two step estimator with Legendre polynomials in first...

Description Usage Arguments Value Examples

View source: R/spaddinf.R

Description

Fit two step estimator with Legendre polynomials in first step and B-splines in the second step

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
preresmth.Legr.Bspl(
  X,
  Y,
  d.pre,
  d.re = NULL,
  lambda,
  eta,
  n.foi,
  plot = FALSE,
  alpha = 0.05
)

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.

x

a sequence of values at which the final estimators should be evaluated

K

the order of the Legendre polynomials. E.g. K=0 fits piecwise constant, K=1 fits piecewise linear functions.

Value

a list with the fitted functions and pointwise confidence intervals

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data <- data_gen(n = 200, q = 50, r = .9)

preresmth.Legr.Bspl.out <- preresmth.Legr.Bspl(Y = data$Y,
                                               X = data$X,
                                               d.pre = 20,
                                               d.re = 10,
                                               lambda = 5,
                                               eta = 3,
                                               n.foi = 6,
                                               plot = TRUE,
                                               alpha = 0.05)

gregorkb/spaddinf documentation built on July 23, 2021, 4:02 a.m.