diagnose(object, data, id.vars, suspect.var, suspect.range = NULL)assignment.suspect.var.data contain identifying information.data
contains the variable suspected of interference or imbalance.suspect.var within which units in different treatment
conditions must fall to be considered suspect.object requires rows to correspond to blocks and columns to
correspond to treatment conditions, such as output from assignment.data should include identifying variables and variable suspected
of interference or imbalance. Typically, data may be the same
dataframe input into block.
An example of specified identifying variables is id.vars = c("id",
"id2"). Unlike block, diagnose requires that the length of
id.vars correspond to the level of the original blocking. See
block documentation for details.
An example of specified suspect range is suspect.var = "b2",
suspect.range = c(0,50) identifies all units assigned to
different treatment conditions no more than 50 units apart on variable
{b2.
}
suspect.range on the
variable suspect.var. The last column of each dataframe displays
the observed difference between the two units.
[object Object]
assignment, block
## First, block out <- block(x100, groups = "g", n.tr = 2, id.vars = c("id"), block.vars = c("b1", "b2"), algorithm="optGreedy", distance = "mahalanobis", level.two = FALSE, valid.var = "b1", valid.range = c(0,500), verbose = TRUE) ## Second, assign assg <- assignment(out, seed = 123) ## Third, diagnose diag <- diagnose(object = assg, data = x100, id.vars = "id", suspect.var = "b2", suspect.range = c(0,50))