lei_wasserman_data: Generate data from example in Lei and Wasseerman (2014) paper

Description Usage Arguments Value

View source: R/data_lei_wasserman.R

Description

The generative model is defined as

X \sim Unif(-1.5, 1.5)

(Y|X=x) \sim .5 N(f(x)-g(x), σ^2(x)) + .5 N(f(x)+g(x), σ^2(x))

where

  1. f(x) = (x-1)^2(x+1),

  2. g(x) = 2√(x+.5)\mathbb{I}(x≥q -.5), and

  3. σ(x) = 1/4 + |x|.

Usage

1
lei_wasserman_data(n = 1000, sigma_function = inner_sigma)

Arguments

n

number of observations

sigma_function

a function for the sigma function. The default is described above, but using function(x){0.0001} would return the means of the functions

Value

data.frame for (x,y) pairs of n simulations from the generative process


benjaminleroy/simulationBands documentation built on Dec. 19, 2021, 8:41 a.m.