These are some preconfigured generation components and all wrappers around sim_gen
and sim_gen_cont
.
sim_gen_x(simSetup, mean = 0, sd = 4, name = "x")sim_gen_e(simSetup, mean = 0, sd = 4, name = "e")
sim_gen_ec(
simSetup,
mean = 0,
sd = 150,
name = "e",
nCont = 0.05,
type = "unit",
areaVar = "idD",
fixed = TRUE
)
sim_gen_v(simSetup, mean = 0, sd = 1, name = "v")
sim_gen_vc(
simSetup,
mean = 0,
sd = 40,
name = "v",
nCont = 0.05,
type = "area",
areaVar = "idD",
fixed = TRUE
)
a sim_setup
.
the mean passed to the random number generator, for example
rnorm
.
the standard deviation passed to the random number generator, for example rnorm.
name of variable as character in which random numbers are stored.
gives the number of contaminated observations. Values between 0
and 1 will be treated as probability. If type is 'unit' and length is
larger than 1, the expected length is the number of areas. If type is
'area' and length is larger than 1 the values are interpreted as area
positions; i.e. c(1, 3)
is interpreted as the first and 3rd area in
the data is contaminated.
"unit" or "area" - unit- or area-level contamination.
character with variable name(s) identifying areas.
TRUE fixes the observations which will be contaminated. FALSE will result in a random selection of observations or areas.
x
: fixed-effect component; e
: model-error; ec
: contaminated model error; v
: random-effect (error constant for each domain); vc
contaminated random-effect. Note that for contamination you are expected to add both, a non-contaminated component and a contaminated component.