View source: R/quasianscombe.R
sim_quasianscombe_set_4 | R Documentation |
Data sets Type 4 recreate two cluster keeping the coefficient of the original regression model.
sim_quasianscombe_set_4(df, rescale_to = c(0.1, 0.2), prop = 0.15)
df |
A data frame from |
rescale_to |
Rescale the x value before create the second cluster. |
prop |
The proportion of value to modify as the second group/cluster. |
This function will:
Disorder the order of x
values.
Rescale the x
value to specific original quantiles.
Then take a proportion of value and translate to left keeping the original
mean of x
.
Finally add some value to the associated y
value and subtract to the
complement group to have the same regression model in terms of coefficients.
df <- sim_quasianscombe_set_1() dataset4 <- sim_quasianscombe_set_4(df) dataset4 plot(dataset4) plot(sim_quasianscombe_set_4(df, rescale_to = c(0, .1), prop = 0.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.