plot_reg: Plot regression estimator

Description Usage Arguments Details Value Examples

View source: R/plot_reg.R

Description

This function plots the regression estimator given by reg_est.

Usage

1
plot_reg(basis1, basis2, data, f = NULL, compare = TRUE)

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.

f

a function. This function (if passed) may be used to compare the estimate to a known function. The default ist NULL.

compare

a logical value. If TRUE (the default), the regression estimate is compared to f if f is passed. If FALSE only the estimate is plotted

Details

Note, that the graph only contains a scatter plot consisting of the data points passed by data.

Value

no return

Examples

1
2
3
4
5
6
7
## Not run: 
hist_bas <- Hist_Basis$new(15)
dens1 <- function(x) dnorm(x, 0.5, 0.088)
datasim <- datsim(dens1, log, 15)
plot_reg(hist_bas, hist_bas, datasim, f = log)

## End(Not run)

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