baSimuError | R Documentation |
Simulate random error
baSimuError(
n,
error.type = c("normal", "skewed"),
sig = 1,
mu = 0,
skew.mu = NULL,
skew.phi = NULL,
skew.noise = 0.001
)
n |
sample size |
error.type |
normal or skewed |
sig |
standard deviation |
mu |
mean |
skew.mu |
if skewed, by how much |
skew.phi |
if skewed, by how much |
skew.noise |
if skewed, contains how much noise |
Skewed distribution: Prameterization: mu, phi; RNBINOM uses (n,p) with: phi = n, mu = n(1-p)/p; Mean: mu = n(1-p)/p #; Variances: mu(1+mu/phi) = n (1-p)/p^2
check detail for exact computation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.