calSecDerNatSpline: calSecDerNatSpline

View source: R/calSecDerNatSpline.R

calSecDerNatSplineR Documentation

calSecDerNatSpline

Description

Natural Spline Basis and the Regularization Matrix A_m

Usage

calSecDerNatSpline(grd)

Arguments

grd

A vector of length p indicating the grd values where the spline functions are evaluated.

Details

calSecDerNatSpline calculates evaluated natural cubic splines and the matrix A_m as described in Crambes, Kneip and Sarda (2016).

calSecDerNatSpline calculates an evaluated natural cubic spline basis corresponding to grd and a p \times p matrix used for regularization in the smoothing splines estimator for the functional linear model (Crambes, Kneip and Sarda,2016). A_m is composed of a non-classical projection matrix and the classical regularization matrix of squared second derivatives.

Value

A list with entries

A_m

The p \times p matrix A as described in (Crambes, Kneip and Sarda, 2016)

X_B

A p \times p matrix of natural cubic spline basis evaluated at grd.

Author(s)

Dominik Liebl, Stefan Rameseder and Christoph Rust

References

Crambes, C., Kneip, A., Sarda, P. (2009) Smoothing Splines Estimators for Functional Linear Regression. The Annals of Statistics, 37(1), 35-72.

See Also

FunRegPoI

Examples

## Not run: 
library(FunRegPoI)

## Define Parameters for Simulation
DGP_name    <- "Easy"
k_seq       <- c(1,seq(2, 60, 4))
error_sd    <- 0.125
N           <- 500
p           <- 300
domain      <- c(0,1)
grd         <- seq(domain[1],domain[2],length.out = p)

set.seed(1)
## simulate some data:
PoISim      <- FunRegPoISim(N = N , grd, DGP = DGP_name , error_sd = error_sd)

NaturalSplines <- calSecDerNatSpline(grd)

# PESES
EstPeses  <- FunRegPoI(Y = PoISim$Y , X_mat = PoISim$X , grd, estimator = "PESES",
                       k_seq = k_seq , A_m = NaturalSplines$A_m , X_B = NaturalSplines$X_B)


## End(Not run)


christophrust/FunRegPoI documentation built on April 10, 2022, 2:22 p.m.