Description Usage Arguments Value Examples

Generate simulated data for multilevel models

1 2 3 | ```
gen_multilevel(n = 25, m = 6, sigma_e = 2, sigma_u0 = 2,
sigma_u1 = 2, sigma_u01 = -2, beta0 = 0, beta1 = 2,
x.jitter = 0.5, seed = NULL)
``` |

`n` |
Sample size. Input either a single number for a balanced data set,
or a vector of length |

`m` |
Number of groups/levels. |

`sigma_e` |
The standard deviation of the errors. |

`sigma_u0` |
The standard deviation of the random intercept. |

`sigma_u1` |
The standard deviation of the random slopes. |

`sigma_u01` |
The covariance of between the random intercept and the random slope. |

`beta0` |
The mean of the random intercept. |

`beta1` |
The mean of the random slope. |

`x.jitter` |
A small amount of jitter is added to the |

`seed` |
(Optional) Random seed. |

A dataframe containing the response variable `y`

, the
unidimensional explanatory variables `X`

, and the levels/groups
(factors).

1 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.