This function prepares a dataset for grouped statistical tests by: - Filtering out NA values in the target variable; - Dropping empty groups and reporting excluded levels; - Splitting the values by group and computing sample sizes.
Diese Funktion bereitet Daten fuer gruppierte Tests vor: - Entfernt fehlende Werte (NA) in der Zielvariablen; - Entfernt leere Gruppen und gibt eine Warnung aus; - Teilt die Werte nach Gruppen und berechnet Stichprobengroessen.
prepare_group_data(df, value_col = ".value", group_col = "jahr")A list with the following elements:
The filtered data frame with updated grouping column.
A list of vectors, one per group, containing values.
A named vector with sample sizes per group.
The number of groups remaining after filtering.
The names of the groups.
A data.frame or tibble containing the data.
A string indicating the name of the column with values to test.
A string indicating the name of the grouping column.
Cleans and splits the input data by group, removing missing values and empty groups.