generated from byu-transpolab/template_quarto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05_discussion.qmd
166 lines (118 loc) · 7.03 KB
/
05_discussion.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Discussion and Applications {#sec-contribs}
```{r setup3, file = "R/chapter_start.R", include = FALSE, cache = FALSE}
```
```{r model-setups, include=FALSE}
f <- function(x) format(round(x, 3), big.mark=",")
gm <- list(
list("raw" = "Num.Obs.", "clean" = "Number of Observations", "fmt" = f),
list("raw" = "Log.Lik.", "clean" = "Log Liklihood", "fmt" = f),
list("raw" = "rho20", "clean" = "$\\rho^2_0$", "fmt" = f))
cm_group <- c(
"numTrips" = "Number of Activities",
"sev_day_avg" = "7-Day Rolling Avg. Number of Activities",
"park" = "Visits to Parks",
"grocery" = "Visits to Grocery Store",
"library" = "Visits to Libraries",
"social_rec" = "Visits to Social Recreation Locations")
```
## Relationship between suicidal ideation and motivation
Considering the data presented on the three groups—control, social anxiety, and autism—several potential connections between their activity engagements, motivation levels, and suicidal ideation can be explored.
Activity engagements may serve as a reflection of one's mental state and well-being. The differences observed in the number of activities and their nature across the groups could indicate variations in their daily routines, coping mechanisms, and social interactions. For instance, individuals in the control group might exhibit higher activity engagement, possibly indicative of better mental health and social integration compared to those in the social anxiety and autism groups.
Motivation levels could play a significant role in influencing activity engagements and, consequently, mental well-being. Lower motivation levels, as observed in the autism group and social anxiety group compared to the control group, might contribute to decreased participation in activities and decreased overall satisfaction with life. This, in turn, could exacerbate feelings of isolation, loneliness, and low self-esteem, which are known risk factors for suicidal ideation.
The prevalence of suicidal ideation across the groups underscores the complex interplay between mental health and activity engagement. Individuals experiencing higher levels of suicidal ideation may exhibit decreased motivation to engage in activities and may withdraw from social interactions, leading to further isolation and worsening mental health outcomes. Conversely, active engagement in meaningful activities and supportive social networks could serve as protective factors against suicidal ideation. In addition, the literature suggests that suicidal behavior is negatively associated with overall well-being [@fonseca-pedreroRiskProtectiveFactors2022; @fumeroAdolescentsBipolarExperiences2021]. Since we connected motivation to well-being, a similar association is drawn between suicidal tendency and motivation.
Overall, the data suggest potential links between activity engagements, motivation levels, and suicidal ideation among the three groups.
@fig-groupAnaly shows the relationship between motivation and suicidal intensity by group.
```{r figure groupAnaly, message=FALSE, echo=FALSE}
#| label: fig-groupAnaly
#| fig-cap: "Motivation vs Suicidal Intensity"
library(plm)
tar_load(model_data)
analysis <- model_data %>%
select(userId, prescribed_group, activityDay, motivation, numTrips, sev_day_avg, suicidal_intensity_q32_even) %>%
filter(!is.na(suicidal_intensity_q32_even) & suicidal_intensity_q32_even != "CONDITION_SKIPPED") %>%
mutate(suic_intensity = as.numeric(suicidal_intensity_q32_even)) %>%
filter(!is.na(suic_intensity))
### STRAIGHT LINEAR MODEL, no FE
ggplot(analysis, aes(y = motivation, x = suic_intensity, color = prescribed_group)) +
geom_point(alpha = 0.5) +
geom_smooth(method = "lm", se = FALSE, color = "black") +
facet_wrap(~prescribed_group) +
labs(y = "Level of Motivation", x = "Suicidal Intensity") +
theme_bw()
## ALL THREE GROUPS
fixed <- plm(motivation ~ suic_intensity, index = c("userId", "activityDay"), data = analysis, model = "within")
plot(fixed)
## CONTROL GROUP
control <- analysis %>%
filter(prescribed_group == "Control")
fixed_control <- plm(motivation ~ suic_intensity, index = c("userId", "activityDay"), data = control, model = "within")
fixef(fixed_control)
## AUTISM GROUP
autism <- analysis %>%
filter(prescribed_group == "Autism")
fixed_autism <- plm(motivation ~ suic_intensity, index = c("userId", "activityDay"), data = autism, model = "within")
plot(fixed_autism)
# SOCIAL ANXIETY GROUP
social_anxiety <- analysis %>%
filter(prescribed_group == "Social Anxiety")
fixed_social_anxiety <- plm(motivation ~ suic_intensity, index = c("userId", "activityDay"), data = social_anxiety, model = "within")
plot(fixed_social_anxiety)
```
@fig-groupAnaly3 shows the relationship between suicidal intensity and the number of activities by group.
```{r figure groupAnaly3, message=FALSE, echo=FALSE}
#| label: fig-groupAnaly3
#| fig-cap: "Number of Activities vs Suicidal Intensity"
ggplot(analysis, aes(y = suic_intensity, x = numTrips, color = prescribed_group)) +
geom_point(alpha = 0.5) +
geom_smooth(method = "lm", se = FALSE, color = "black") +
facet_wrap(~prescribed_group) +
labs(y = "Suicide Intensity", x = "Number of Activities") +
theme_bw()
```
ANOVA AND TUKEY'S HSD
```{r, echo=FALSE, message = FALSE, warning=FALSE}
## | label: tbl-ANOVAActs
## | tbl-cap: "ANOVA Test: Number of Activity by Group"
actsANOVA <- model_data %>%
filter(!is.na(numTrips)) %>%
mutate(prescribed_group = as.factor(prescribed_group)) %>%
rename(Group = prescribed_group)
# Perform ANOVA to test for differences in mean number of activities among prescribed groups
ACTS_anova_result <- aov(numTrips ~ Group, data = actsANOVA)
```
```{r, message=FALSE, echo=FALSE, warning=FALSE}
##| label: tbl-TukeyActs
##| tbl-cap: "TukeyHSD Test: Difference in Mean Motivation Across Groups"
# Perform Tukey's HSD test for pairwise comparisons
results <- TukeyHSD(ACTS_anova_result)
```
```{r, message=FALSE, echo=FALSE, warning=FALSE}
##| label: tbl-ANOVAMotiv
##| tbl-cap: "ANOVA Test: Difference in Mean Motivation Across Groups"
motivANOVA <- model_data %>%
filter(!is.na(motivation))%>%
mutate(prescribed_group = as.factor(prescribed_group)) %>%
rename(Group = prescribed_group)
# Perform ANOVA
MOTIV_anova_result <- aov(motivation ~ Group, data = motivANOVA)
```
```{r, message=FALSE, echo=FALSE, warning=FALSE}
##| label: fig-ANOVAMotiv
##| fig-cap: "Mean levels of motivation by group."
# ggplot(motivANOVA, aes(x = Group, y = motivation)) +
# stat_summary(fun = mean, geom = "point", color = "black") +
# stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = 0.2) +
# labs(x = "Group", y = "Motivation") +
# theme_bw()
```
```{r, message=FALSE, echo=FALSE, warning=FALSE}
##| label: tbl-TukeyMotiv
##| tbl-cap: "TukeyHSD Test: Difference in Mean Motivation Across Groups"
result <- TukeyHSD(MOTIV_anova_result)
```
```{r, message=FALSE, echo=FALSE, warning=FALSE}
##| label: tbl-groupSuicideChi
##| tbl-cap: "Pearson Chi Test: Suicidal Ideation by Group"
contingency_table <- table(suic$prescribed_group, suic$`Suicidal Ideation`)
chisq_result <- chisq.test(contingency_table)
```