generate_descriptives {mmibain} | R Documentation |
This internal helper function generates descriptive statistics for each group within the original study data. It calculates the sample size, mean, standard deviation, median, median absolute deviation, minimum, maximum, skewness, and kurtosis for the values associated with each group.
generate_descriptives(df, group_var)
df |
A data frame containing the study data. |
group_var |
The name of the column in |
The function iterates over each unique group found in the group_var
column
of the data frame df
. For each group, it computes the descriptive statistics
using base R functions and functions from the psych
and e1071
packages for
skewness and kurtosis, respectively.
The results are returned as a data frame where each row corresponds to a group and each column to a descriptive statistic.
As this is an internal function intended for use within process_original_study function of the package.