Pairwise ComparisonsNote that since our gender variable contains only two levels, there is no need to conduct follow-up comparisons. Further, there is insufficient statistical support for a gender difference in the medical treatment. These results suggest that the mental treatment is more effective in reducing stress for females than males, while the physical treatment is more effective for males than females. In the physical condition, the means are 4 for males and 2 for females. In the mental condition, the means are 3 for males and 4 for females. 001) groups was statistically significant. 017, the gender effect within the mental ( p =. The gender within treatment group ANOVA testsĪt an alpha level of. > anova(lm(StressReduction ~ Gender, dataPhysical)).> anova(lm(StressReduction ~ Gender, dataMental)).> anova(lm(StressReduction ~ Gender, dataMedical)).> dataPhysical #run ANOVA on the treatment subsets to investigate the impacts of gender within each.> #use subset(data, condition) to divide the original dataset.We can create subsets of our dataset using the subset(data, condition) function, where data is the original dataset and condition contains the parameters defining the subset. To do so, we need to divide our dataset along each level of our treatment variable. The omnibus ANOVA test Divide the DataThe significant omnibus interaction suggests that we should ignore the main effects and instead investigate the simple main effects for our independent variables. > dataTwoWayInteraction #display the data.> #read the dataset into an R variable using the read.csv(file) function.The values represent how effective the treatment programs were at reducing participant’s stress levels, with higher numbers indicating higher effectiveness.īeginning StepsTo begin, we need to read our dataset into R and store its contents in a variable. This dataset can be conceptualized as a comparison between three stress treatment programs, one using mental methods, one using physical training, and one using medication across genders. The stress reduction values are represented on a scale that ranges from 1 to 5. This dataset contains a hypothetical sample of 60 participants who are divided into three stress reduction treatment groups (mental, physical, and medical) and two gender groups (male and female). Be sure to right-click and save the file to your R working directory. Tutorial FilesBefore we begin, you may want to download the sample data (.csv) used in this tutorial. This tutorial will demonstrate how to conduct pairwise comparisons when an interaction is present in a two-way ANOVA. When an interaction is present in a two-way ANOVA, we typically choose to ignore the main effects and elect to investigate the simple main effects when making pairwise comparisons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |