Description Usage Arguments Details

Input simulation parameters and returns random effects.

1 2 | ```
sim_rand_eff(random_var, n, rand_gen, ther = c(0, 1), ther_sim = FALSE,
cor_vars = NULL, ...)
``` |

`random_var` |
Variance of random effects. Must be same length as random. |

`n` |
Cluster sample size. |

`rand_gen` |
The generating function used (e.g. rnorm). |

`ther` |
A vector of length two that specifies the theoretical mean and standard deviation of the rand_gen. This would commonly be used to standardize the generating variable to have a mean of 0 and standard deviation of 1 to meet model assumptions. The variable is then rescaled to have the variance specified by random_var. |

`ther_sim` |
A TRUE/FALSE flag indicating whether the error simulation function should be simulated, that is should the mean and standard deviation used for standardization be simulated. |

`cor_vars` |
A vector of correlations between random effects. |

`...` |
Additional values that need to be passed to the function called from rand_gen. |

Simulates random effects for the master function `sim_reg`

when
simulating a linear mixed model, both cross sectional and longitudinal.
Allows the ability to simulate random effects from a Laplace,
chi-square (1), mixture normal, or normal distribution.

simglm documentation built on Jan. 24, 2019, 1:04 a.m.

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.