demo_spline | R Documentation |
This is a simple dataset with nonlinear relationships between the outcome and mediators. It is used simply to illustrate the design of multimedia. The mediator->outcome effect is generated from a random spline function.
demo_spline(n_samples = 5000, tau = c(2, 2))
n_samples |
The number of samples to generate in the toy example |
tau |
The true direct effects associated with the two outcomes. Defaults to 2, 2. |
xy A data.frame whose columns include the treatment, mediation, and outcome variables.
demo_spline()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.