What would an appropriate test be for testing whether group 3 has a larger vital capacity than group 1 from the vitcap dataset in the ISwR package. This is what I was thinking so far, but I'm really not sure if this is the right test to use. Surely this is just showing whether the difference in means = 0 or not?
c = vitcap # Load the vitcap data c # Displays the data group1 = subset(c, c[,1]==1) # Creates a subset of group 1 group1 # Displays the subset group3 = subset(c, c[,1]==3) # Creates a subset of group 3 group3 # Displays the subset qqplot(group1[,2], group1[,3]) # Checking if the data is normally distributed qqplot(group3[,2], group3[,3]) # Checking if the data is normally distributed # The QQ Plots appear to show the data is normally distributed, thus we assume normality t.test(group1[,3], group3[,3]) # 95% CI for the vital capacity of each group
Any help would be greatly appreciated.