Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Seasonal affective disorder (SAD) is a type of depression during seasons with le

ID: 2945720 • Letter: S

Question

Seasonal affective disorder (SAD) is a type of depression during seasons with less daylight (e.g, winter months). One therapy for SAD is phototherapy, which is increased exposure to light used to improve mood. A researcher tests this therapy by exposing a sample of patients with SAD to different intensities of light (low, medium, high) in a light box, either in the morning or at night (these are the times thought to be most effective for light therapy). All participants rated their mood following this therapy on a scale from 1 (poor mood) to 9 (improved mood. The hypothetical results are given in the following table. Light Intensity Low Medium High Morning5 Time of Day Night

Explanation / Answer

a)R CODES :
> mood=c(5,4,7,6,6,8,4,4,6,7,7,9,5,9,5,6,8,8,5,6,9,8,8,7,6,7,6,7,5,8,3,9,7,3,8,6)
> intensity=rep(c("Low","Medium","High"),3)
> time=c(rep("Morning",18),rep("Night",18))
> df=data.frame(mood,intensity,time)
> df
mood intensity time
1 5 Low Morning
2 4 Medium Morning
3 7 High Morning
4 6 Low Morning
5 6 Medium Morning
6 8 High Morning
7 4 Low Morning
8 4 Medium Morning
9 6 High Morning
10 7 Low Morning
11 7 Medium Morning
12 9 High Morning
13 5 Low Morning
14 9 Medium Morning
15 5 High Morning
16 6 Low Morning
17 8 Medium Morning
18 8 High Morning
19 5 Low Night
20 6 Medium Night
21 9 High Night
22 8 Low Night
23 8 Medium Night
24 7 High Night
25 6 Low Night
26 7 Medium Night
27 6 High Night
28 7 Low Night
29 5 Medium Night
30 8 High Night
31 3 Low Night
32 9 Medium Night
33 7 High Night
34 3 Low Night
35 8 Medium Night
36 6 High Night
> model=aov(mood~intensity+time+time*intensity,data=df)
> summary(model)
Df Sum Sq Mean Sq F value Pr(>F)  
intensity 2 20.06 10.028 3.924 0.0306 *
time 1 0.44 0.444 0.174 0.6796  
intensity:time 2 1.72 0.861 0.337 0.7166  
Residuals 30 76.67 2.556
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Decision for the main effect of the time of the day : Accept the null hypothesis. (p-value > 0.05)
Decision for the main effect of the intensity : Reject the null hypothesis. (p-value < 0.05)
Decision for the interaction effect of the time of the day and intensity : Accept the null hypothesis. (p-value > 0.05)

b)

> TukeyHSD(model)
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = mood ~ intensity + time + time * intensity, data = df)

$intensity
diff lwr upr p adj
Low-High -1.7500000 -3.3589100 -0.141090 0.0307925
Medium-High -0.4166667 -2.0255767 1.192243 0.8002266
Medium-Low 1.3333333 -0.2755767 2.942243 0.1193818

$time
diff lwr upr p adj
Night-Morning 0.2222222 -0.8660438 1.310488 0.6796265

$`intensity:time`
diff lwr upr p adj
Low:Morning-High:Morning -1.666667e+00 -4.473931 1.140598 0.4773376
Medium:Morning-High:Morning -8.333333e-01 -3.640598 1.973931 0.9427372
High:Night-High:Morning 0.000000e+00 -2.807264 2.807264 1.0000000
Low:Night-High:Morning -1.833333e+00 -4.640598 0.973931 0.3732715
Medium:Night-High:Morning 8.881784e-16 -2.807264 2.807264 1.0000000
Medium:Morning-Low:Morning 8.333333e-01 -1.973931 3.640598 0.9427372
High:Night-Low:Morning 1.666667e+00 -1.140598 4.473931 0.4773376
Low:Night-Low:Morning -1.666667e-01 -2.973931 2.640598 0.9999703
Medium:Night-Low:Morning 1.666667e+00 -1.140598 4.473931 0.4773376
High:Night-Medium:Morning 8.333333e-01 -1.973931 3.640598 0.9427372
Low:Night-Medium:Morning -1.000000e+00 -3.807264 1.807264 0.8840905
Medium:Night-Medium:Morning 8.333333e-01 -1.973931 3.640598 0.9427372
Low:Night-High:Night -1.833333e+00 -4.640598 0.973931 0.3732715
Medium:Night-High:Night 8.881784e-16 -2.807264 2.807264 1.0000000
Medium:Night-Low:Night 1.833333e+00 -0.973931 4.640598 0.3732715

For the pairs whose p-values are <0.05 are significantly different, i.e (LOW,HIGH) for the intensity factor. Other factors are ignored here since their hypotheses are already accepted.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote