Three Groups Example

on Monday, November 7th, 2022 12:06 | by Silvia Marcato

Pseudocode of the statical analysis with three groups according to the group descriptions.

# If n. of groups = 3 and n. of unique descriptions = 2, then perform
# the statistical analysis between singleton and each doubleton group.
# Else if n. of groups = 3 and descriptions are all identical/different,
# then perform the statistical analysis between each one of them.
if (NofGroups==3 & length(unique(groupdescriptions))==2) {
    statistical_analysis(singleton, doubleton_1)
    statistical_analysis(singleton, doubleton_2)
    plot_results
} else {
    statistical_analysis(group_1, group_2)
    statistical_analysis(group_1, group_3)
    statistical_analysis(group_2, group_3)
    plot_results
}
Example of a graph with two unique descriptions. Data: wtb (control), mut_1 (experimental), mut_2 (experimental).
Example of a graph with two unique descriptions. Data in a different order to show graph flexibility: mut_1 (experimental),
wtb (control), mut_2 (experimental)
Example of a graph with three different descriptions. Data: wtb (control), mut_1 (experimental_1), mut_2 (experimental_2).
Print Friendly, PDF & Email

Category: R code

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.