View source: R/quasianscombe.R
sim_quasianscombe_set_6 | R Documentation |
Data sets Type 6 recreates the phenomenon of Simpon's paradox.
sim_quasianscombe_set_6(df, groups = 3, b1_factor = -1, residual_factor = 0.25)
df |
A data frame from |
groups |
Number of groups to separate |
b1_factor |
A numeric value get the slope in each group from $beta_1$. |
residual_factor |
Numeric value to multiply residual to modify their variance. |
This function will take x
vector and separate groups
groups to apply
a local model with a modified regression using the b1_factor
factor.
The residual will be multiply with a value between 0 and 1 to make the visual effect greater.
df <- sim_quasianscombe_set_1() dataset6 <- sim_quasianscombe_set_6(df) dataset6 plot(dataset6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.