View source: R/blindDataAnova_ScrambleCells.R
Suitable for ANOVA: The function "blindDataAnova_ScrambleCellss" re-assigns at random the labels related to the specific combination of groups a case belongs to (e.g., expert: low, conflict: no, can get assigned to expert: high, conflict: yes). The number of permutations can be requested by user (e.g., if you want to have 6 datasets, input n_pertubations = 6; also defaults to 6). This function works with unequal groups. The function returns a list with dataframes and a dataframe that contains all the permutations (labelled by permutation) for ease of use. The function also returns the number of possible permutations and the number of unique group combinations.
1 | blindDataAnova_ScrambleCells(df_original, y, predictors, n_permutations = 6)
|
df_original |
# original dataframe |
y |
# name of dependent variable |
predictors |
# name of predictors, for example c("expert", "conflict) |
n_permutations |
# number of requested permuted datasets |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.