Closed ldwgchen closed 2 years ago
rnorm_fixed()
guarantees that the observed mean and SD exactly match the true (data-generating) values. This is helpful to infer whether the parameters can be recovered through inference without having to run many simulations. It's a way to avoid the sample deviating greatly from the true generating parameters to make it easier for the reader to recognize whether the inferred values look reasonable.
As seen at the opening source code block in 2 Settings and toy data, rnorm_fixed is a function defined as
rnorm_fixed = function(N, mu = 0, sd = 1) scale(rnorm(N)) * sd + mu
. Scaling something only to unscale it right after is confusing;rnorm(N, mean = mu, sd = sd)
should do just fine.