🚁 Experiment design and data analysis using R
🚁 Experiment design and data analysis using R
Check the assumption of normality of our data
Check the assumption of normality of our data
- Shapiro-Wilk Test:
normality_check <- shapiro.test(mydata$myDependentVariable)
normality_check <- shapiro.test(mydata$myDependentVariable)
if (normality_check$p.value > 0.05){
if (normality_check$p.value > 0.05){
print("The data comes from a population that is normally distributed. Do parametric statistical analysis")
print("The data comes from a population that is normally distributed. Do parametric statistical analysis")
} else {
} else {
print("The data is not normally distributed. Do non-parametric statistical analysis")
print("The data is not normally distributed. Do non-parametric statistical analysis")
}
}
Compare two conditions
Compare two conditions
- Between-subject design: two conditions are independent
- Within-subject design: two conditions are dependent (e.g., pre-test v.s. post-test)
Compare more than three conditions
Compare more than three conditions
- Between-subject design: three (or more) conditions are independent
- Single factor:
- Two factors:
- Parametric statistical analysis: Two-way ANOVA
- Non-parametric statistical analysis: ART + two-way ANOVA
- Within-subject design: three (or more) conditions are dependent (e.g., pre-test v.s. mid-test v.s. post-test)
- Single factor:
- Parametric statistical analysis: Repeated measures ANOVA
- Non-parametric statistical analysis: Friedman test
- Two factors:
- Parametric statistical analysis: Two-way repeated measures ANOVA
- Non-parametric statistical analysis: ART + two-way repeated measures ANOVA
- Mixed factorial design: one factor is dependent, and another factor is independent
- Parametric statistical analysis: Mixed ANOVA
- Non-parametric statistical analysis: ART + mixed ANOVA
🎠 Plot the results
🎠 Plot the results
Boxplot with symbols showing significant differences. [Code]
⛵️ Self-learning and debugging
⛵️ Self-learning and debugging
Try googling different combinations of keywords:
E.g.: R t-test example; R [error message] stackoverflow; R colab install packages, etc.