Check the design of the experiment or study for balance.
USAGE:
isBalanced(object, countOnly, level)
REQUIRED ARGUMENTS:
object
A
groupedData object containing a data frame and a
formula that describes the roles of variables in the data frame. The
object will have one or more nested grouping factors and a primary
covariate.
countOnly
A logical value indicating if the check for balance
should only consider the number of observations at each level of the
grouping factor(s). Defaults to
FALSE.
level
an optional integer vector specifying the desired
prediction levels. Levels increase from outermost to innermost
grouping, with level 0 representing the population (fixed effects)
predictions. Defaults to the innermost level.
VALUE:
TRUE or
FALSE according to whether the data are balanced
or not
SEE ALSO:
,
EXAMPLES:
isBalanced(Orthodont) # should return TRUE
isBalanced(Orthodont, countOnly = TRUE) # should return TRUE
isBalanced(Pixel) # should return FALSE
isBalanced(Pixel, level = 1) # should return FALSE