Module 8 Assignment
A researcher is interested in the effects of drug against stress reaction. She gives a reaction time to three different groups of subjects: one group that is under a great deal of stress, one group that is under a moderate amount of stress, and a third group that is under almost no stress. The subjects od the study were instructed to take the drug test during their next stress episode and to report their stress on a scale of 1 to 10 (10 being most pain).
- Report on drug and stress level by using R. Provide a full summary report on the results of ANOVA testing and what does it mean. More specifically, report using the following R functions: Df, Sum, Sq mean, Sq, F value, Pr(>F)
Fist I created a data frame using the data provided, which includes three columns of different levels of stress high, moderate, and low. The data from these columns were combined into a single vector called "data.combined" to simplify assigning group labels, with each stress levels repeated six times to match the number of observations. The ANOVA test was performed determine whether significant differences appeared among the three level of stress, and the summary() functions was used to analyze the results. The output of the ANOVA showed 2 degrees of freedom (df) for the stress level groups, a sum of squares (Sum Sq) of 82.11, and a mean of square (Mean Sq) of 41.06 (82.11 / 2). The f - statistic was 21.36, calculated by dividing the group mean square by the residual mean square (41.06 / 1.92), and the p - value was 4.08e - 05, indicating a statistically significant result. The large f value with the low p-value, it provides strong evidence against the null hypothesis, showing that the mean stress level differs significantly among the three groups.
2. The zelazo data (taken from textbook's R package called ISwR) are in the form of a list of vectors, one for each of the four groups. Convert the data to a form suitable for the user of lm, and calculate the relevant test. Consider t tests comparing selected subgroups or obtained by combing groups. Consider ANOVA test (one way or two-way) for this dataset (zelazo).
.png)
.png)
.png)
.png)
Comments
Post a Comment