Input error simulation parameters and outputs simulated errors.
sim_err_single(
error_var,
n,
with_err_gen,
arima = FALSE,
lvl1_err_params = NULL,
arima_mod = list(NULL),
ther = c(0, 1),
ther_sim = FALSE,
homogeneity = TRUE,
fixef = NULL,
heterogeneity_var = NULL,
...
)
Numeric scalar of error variance or vector used when simulating heterogeneity of variance.
Cluster sample size.
The generating function used.
TRUE/FALSE flag indicating whether residuals should
be correlated. If TRUE, must specify a valid model to pass to
arima.sim via the arima_mod argument.
See arima.sim
for examples.
Additional values that need to be passed to the function called from with_err_gen.
A list indicating the ARIMA model to pass to arima.sim.
See arima.sim
for examples.
A vector of length two that specifies the theoretical mean and standard deviation of the with_err_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 error_var.
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.
Either TRUE (default) indicating homogeneity of variance assumption is assumed or FALSE to indicate desire to generate heterogeneity of variance.
The design matrix, this is passed internally and used for heterogeneity of variance simulation.
Variable name as a character string to use for heterogeneity of variance simulation.
Not currently used.
Simulates error term for single level regression models.