glober.1d {glober}R Documentation

Estimation of functions with one input variable

Description

This function implements the method described in Savino, M and Levy-Leduc, C (2023) for estimating functions in the one-dimensional setting with observations which are assumed to satisfy a nonparametric regression model. The observation points belong to a compact set of R\mathbb{R}.

Usage

glober.1d(x, y, xpred, ord, parallel = FALSE, nb.Cores = 1)

Arguments

x

matrix of one column or vector containing the values of the input variables.

y

vector containing the corresponding response variable associated to the input values x\texttt{x}.

xpred

matrix of one column or vector containing the input variables for which ff has to be estimated.

ord

order of the B-spline basis used in the regression model. Default is 3 (quadratic B-splines).

parallel

logical, if TRUE then a parallelized version of the code is used. Default is FALSE.

nb.Cores

numerical, number of cores used for parallelization, if parallel is set to TRUE.

Value

festimated

estimation of ff at xpred\texttt{xpred}.

knotSelec

selected knots used in the definition of the B-splines.

rss

residual sum-of-squares (RSS) of the model.

rsq

R-squared of the model, calculated as 1RSSTSS1 - \frac{RSS}{TSS} where TSS is the total sum-of-squares of the model.

Examples

# --- Loading values of x --- #
data('x_1D')
# --- Loading values of the corresponding y --- #
data('y_1D')
# --- Loading values of xpred --- #
data('xpred_1D')

# --- Estimation of f at xpred --- #
glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = FALSE)


# --- Parallel computing --- #
glober.1d(x = x_1D, y = y_1D, xpred = xpred_1D, ord = 3, parallel = TRUE, nb.Cores = 2)
 

[Package glober version 1.0 Index]