con_check | R Documentation |
Multiple factors in a dataframe are said to be connected if a model matrix based on those factors is full rank.
This function provides a formula interface to the lfe::compfactor() function to check for connectedness of the factors.
con_check(data = NULL, formula = NULL, WW = TRUE, dropNA = TRUE)
data |
A dataframe |
formula |
A formula with multiple factor names in the dataframe,
like |
WW |
Pass-through argument to |
dropNA |
If TRUE, observed data that are |
A vector with integers representing the group membership of each observation.
Kevin Wright
None
# In the data_eccleston dataframe, each pair of factors is connected.
con_check(data_eccleston, ~ row + trt)
con_check(data_eccleston, ~ col + trt)
con_check(data_eccleston, ~ row + col)
# But all three factors are COMPLETELY disconnected into 16 groups.
con_check(data_eccleston, ~ row + col + trt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.