Description Usage Arguments Details Value Examples
data is a mixture of 1/3 from y ~ norm(mu = 0, sd = 1), x ~ unif(min = -6,max = -1)
1 2 3 4 5 6 7 | generate_split_mixture(
n = 1500,
right_beta = c(-1, 1),
right_intercept = c(0, 0),
right_sd = c(1, 1),
right_proportions = c(0.5, 0.5)
)
|
n |
number of points (2/3 right side, 1/3 left side) |
right_beta |
vector length 2, see above |
right_intercept |
vector length 2, see above |
right_sd |
vector length 2, see above |
right_proportions |
vector length 2, see above |
and 2/3 from x ~ unif(min = -1, max = 10), y ~ p1 M1(x) + p2 M2(x) where (M1,M2)(x) ~ right_intercept + N(right_beta*x, right_sd) and (p1,p2) = right_proportions
data frame (x,y) sampled from the above distribution
1 2 3 4 | library(ggplot2)
data_all <- generate_split_mixture(n = 1500)
ggplot(data_all) +
geom_point(aes(x = x, y = y), alpha = .3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.