Description Usage Arguments Details See Also Examples
These functions are intended to be used with sim_gen and not
interactively. They are designed to draw random numbers according to the
setting of grouping variables.
1 2 3 4 5 6 7 8 9 |
mean |
the mean passed to the random number generator, for example
|
sd |
the standard deviation passed to the random number generator, for example rnorm. |
name |
name of variable as character in which random numbers are stored. |
rho |
the correlation used to create the variance covariance matrix for
a SAR process - see |
type |
either "rook" or "queen". See |
groupVar |
a variable name identifying groups. |
timeVar |
a variable name identifying repeated measurements. |
generator |
a function producing random numbers. |
... |
arguments passed to |
groupVars |
names of variables as character. Identify groups within random numbers are constant. |
gen_norm is used to draw random numbers from a normal
distribution where all generated numbers are independent.
gen_v_norm and gen_v_sar will create an area-level random
component. In the case of v_norm, the error component will be from a
normal distribution and i.i.d. from an area-level perspective (all units in
an area will have the same value, all areas are independent). v_sar will also
be from a normal distribution, but the errors are correlated. The variance
covariance matrix is constructed for a SAR(1) - spatial/simultanous
autoregressive process. mvrnorm is used for the random number
generation. gen_v_norm and gen_v_sar expect a variable
idD in the data identifying the areas.
gen_generic can be used if your world is not normal. You can specify
'any' function as generator, like rnorm. Arguments in
... are matched by name or position. The first argument of
generator is expected to be the number of random numbers (not
necessarily named n) and need not to be specified.
sim_gen, sim_gen_x,
sim_gen_e, sim_gen_ec, sim_gen_v,
sim_gen_vc, cell2nb
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.