The total number of effects simulated will be n*d, where d is the number of
columns in the 'G' matrix. The standard normal deviates can be supplied
instead of generated within the function when stdnorms != NULL
. The
length of this vector must be n*nrow(G)
.
Supplied incidence matrices should be n-by-n symmetric matrices. For
simulated random effects using design matrices, see drfx
. If
no incidence matrix is supplied, incidence = NULL
, the function first
checks the environment to see if anything with the name
'nadiv_prev_Mincidence' exists when checking ls()
. If so, this saved
version is used with a warning. Otherwise the Identity matrix is used,
which assumes that all 'n' random effects are independently and identically
distributed (default to Identity matrix).
BE CAREFUL with saveIncidence = TRUE
as this will save the incidence
matrix outside of the function environment so as to be accessed within the
function at a later call. This can be useful for Monte Carlo simulation, to
avoid performing the cholesky decomposition on a large matrix at each
iteration. Setting warn = FALSE
will suppress the warnings that this
is occurring. DO NOT turn this warning off unless you are sure which
incidence matrix will be used by grfx
.
If G = x, where 'x' is a single number, then 'x' should still be specified
as a 1-by-1 matrix (e.g., matrix(x)
). Note, the G-matrix should
never have a structure which produces a correlation exactly equal to 1 or
-1. Instead, covariances should be specified so as to create a correlation
of slightly less than (greater than) 1 (-1). For example: 0.9999 or
-0.9999.