Description Usage Arguments Details Value
View source: R/data_lei_wasserman.R
Generate data from example in Lei and Wasseerman (2014) paper
1 2 3 4 5 6 | lei_wasserman_data_conditional_simulate(
x,
n = 200,
sigma_function = inner_sigma,
verbose = T
)
|
x |
x value (can be a vector) |
n |
number of simulations per x value |
sigma_function |
a function for the sigma function. The default is
described above, but using |
verbose |
boolean, if we should enumerate the how many |
The generative model is defined as
(Y|X=x) \sim .5 N(f(x)-g(x), σ^2(x)) + .5 N(f(x)+g(x),σ^2(x))
where
f(x) = (x-1)^2(x+1),
g(x) = 2√(x+.5)\mathbb{I}(x≥q -.5), and
σ(x) = 1/4 + |x|.
data.frame for (x,y) pairs of n
simulations from the
generative process
list of vectors of simulations (ordered by the x values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.