reg_est: Adaptive estimator for a regression problem

Description Usage Arguments Details Value Examples

View source: R/reg_est.R

Description

We observe a sample of i.i.d. real random variables (X_{i}, Y_{i}), 1 ≤ i ≤ n and consider the model Y_i = m(X_i) + \varepsilon_i. The \varepsilon_{i} are i.i.d., centred, with common variance, the X_i are i.i.d. with common density f. Moreover, the (X_i)_{1 ≤ i ≤ n} are independent. This function deduces an estimator of the function m.

Usage

1
reg_est(basis1, basis2, data)

Arguments

basis1

an object of class Basis

basis2

an object of class Basis

data

a data frame consisting of two columns. The two columns represent an observed sample of i.i.d. real random variables (X_{i}, Y_{i}), 1 ≤ i ≤ n.

Details

To compute the estimate of m, the quotient of the adaptive estimator of l := m*f and the adaptive estimator of f is used (see est_dens and perfect_D). These two estimators can be calculated using two different bases.

Value

An estimate for m

Examples

1
2
3
4
5
6
7
8
## Not run: 
trig_bas <- Trig_Basis$new(100)
dens1 <- function(x) dunif(x)
data <- datsim(den1, log, 150)
reg_m <- reg_est(trig_bas, trig_bas, data)
reg_m

## End(Not run)

nschaefer1211/OSE documentation built on Dec. 31, 2020, 12:59 a.m.