meaning | R Documentation |
After grouping studies using a meta-grouping function (e.g., 'mgbin'), this function analyzes the composition of each subgroup based on specified categorical variables. It helps to give "meaning" to the statistically derived groups.
meaning(data, subgroup = "subgroup", variables, min = 3)
data |
A data frame or the list object returned by a meta-grouping function. If a list, the function will automatically use the 'data' element. |
subgroup |
A string specifying the name of the subgroup column. Defaults to '"subgroup"'. |
variables |
A character vector of column names (categorical variables) to analyze. |
min |
An integer specifying the minimum number of studies a group must have to be included in the final summarized output. Defaults to 3. |
For each subgroup and each specified variable, the function calculates the percentage distribution of its categories. It identifies the most frequent (dominant) category and performs a chi-squared test to assess if the distribution of categories within that group is significantly different from random.
An S3 object of class 'grouped', which is a list containing three data frames:
'detailed': Contains the percentage distribution for all categories of all variables within every group.
'up.hand': A subset of 'detailed', showing only the dominant category for each variable in each group.
'final': A summarized version of 'up.hand', showing the single most dominant characteristic for each group that meets the 'min' size threshold. This is the default print output.
Ahmed Abdelmageed ahmedelsaeedmassad@gmail.com
mgbin
, mgcont
, mgcor
# Create a sample dataset of studies
study_data <- data.frame(
author = letters[1:10],
country = sample(c("USA", "China", "Egypt"), 10, replace = TRUE),
setting = sample(c("Hospital", "Community"), 10, replace = TRUE),
subgroup = c("group 1", "group 2", "group 1", "group 1", "group 2",
"group 2", "group 1", "group 3", "group 2", "group 2")
)
# Analyze the composition of the subgroups
meaning_result <- meaning(study_data, variables = c("country", "setting"))
# The default print shows the 'final' summary table
print(meaning_result)
# Access detailed results
# meaning_result$detailed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.