Kaitlin Kavlie PSYC-541
Survey Project: Activity Levels in the Summer versus the Winter
The survey I created consists of questions regarding participants’ activity and energy level in the summer, as well as in the winter. Before importing the data I ran the packages shown below.
library(tidyverse)
library(readxl)
Then I uploaded the Google spread sheet of the data from the responses to my survey and named the data file sw_survey.
sw_survey <- read_csv("https://docs.google.com/spreadsheets/d/1Aec21e0zJASMMHmRY3M0B2OGcjHz8hfGpO9j15pDRoE/export?format=csv")
Rows: 34 Columns: 19
-- Column specification ----------------------------------------------
Delimiter: ","
chr (19): Timestamp, On average, how often do you go outside to en...
Warning in theme$parsed :
closing unused connection 4 (https://docs.google.com/forms/d/19aeoWh1AqQyxvH1q2OIEzWl5VRBQlKbhYFcwIed1BD4/export?format=csv)
Warning in theme$parsed :
closing unused connection 3 (https://docs.google.com/forms/d/19aeoWh1AqQyxvH1q2OIEzWl5VRBQlKbhYFcwIed1BD4/export?format=csv)
i Use `spec()` to retrieve the full column specification for this data.
i Specify the column types or set `show_col_types = FALSE` to quiet this message.
I ran the code below to examine the raw data and variables.
glimpse(sw_survey)
Rows: 34
Columns: 19
$ Timestamp <chr> ~
$ `On average, how often do you go outside to enjoy nature in the summer?` <chr> ~
$ `On average, how often do you go outside to enjoy nature in the winter?` <chr> ~
$ `On average, how often do you enjoy the weather in the summer?` <chr> ~
$ `On average, how often do you enjoy the weather in the winter?` <chr> ~
$ `On average, how productive do you feel in the summer?` <chr> ~
$ `On average, how productive do you feel in the winter?` <chr> ~
$ `How frequently do you feel like you are "in a good mood" in the summer?` <chr> ~
$ `How frequently do you feel like you are "in a good mood" in the winter?` <chr> ~
$ `On average, how sufficient would you rate your energy levels in the summer?` <chr> ~
$ `On average, how sufficient would you rate your energy levels in the winter?` <chr> ~
$ `How often do you enjoy outdoor hobbies in the summer?` <chr> ~
$ `How often do you enjoy outdoor hobbies in the winter?` <chr> ~
$ `How often do you enjoy indoor hobbies in the summer?` <chr> ~
$ `How often do you enjoy indoor hobbies in the winter?` <chr> ~
$ `How often do you feel like you are "just trying to get by" in the summer?` <chr> ~
$ `How often do you feel like you are "just trying to get by" in the winter?` <chr> ~
$ `In the summer, how often do you experience a loss of interest in things you typically enjoy?` <chr> ~
$ `In the winter, how often do you experience a loss of interest in things you typically enjoy?` <chr> ~
Then I ran the code chunk below to change the names of the survey questions or variables to simpler terms.
sw_survey <- sw_survey %>%
rename(nature_s = `On average, how often do you go outside to enjoy nature in the summer?`) %>%
rename(nature_w = `On average, how often do you go outside to enjoy nature in the winter?`) %>%
rename(weather_s = `On average, how often do you enjoy the weather in the summer?`) %>%
rename(weather_w = `On average, how often do you enjoy the weather in the winter?`) %>%
rename(productive_s = `On average, how productive do you feel in the summer?`) %>%
rename(productive_w = `On average, how productive do you feel in the winter?`) %>%
rename(mood_s = `How frequently do you feel like you are "in a good mood" in the summer?`) %>%
rename(mood_w = `How frequently do you feel like you are "in a good mood" in the winter?`) %>%
rename(energy_s = `On average, how sufficient would you rate your energy levels in the summer?`) %>%
rename(energy_w = `On average, how sufficient would you rate your energy levels in the winter?`) %>%
rename(outhob_s = `How often do you enjoy outdoor hobbies in the summer?`) %>%
rename(outhob_w = `How often do you enjoy outdoor hobbies in the winter?`) %>%
rename(inhob_s = `How often do you enjoy indoor hobbies in the summer?`) %>%
rename(inhob_w = `How often do you enjoy indoor hobbies in the winter?`) %>%
rename(getby_s = `How often do you feel like you are "just trying to get by" in the summer?`) %>%
rename(getby_w = `How often do you feel like you are "just trying to get by" in the winter?`) %>%
rename(loss_s = `In the summer, how often do you experience a loss of interest in things you typically enjoy?`) %>%
rename(loss_w = `In the winter, how often do you experience a loss of interest in things you typically enjoy?`)
Then I re-coded values for the question response options using the code below. Higher numbers coordinate with higher mood, activity, and energy levels. Lower numbers coordinate with lower mood, activity, and energy levels.
sw_survey <- sw_survey %>%
mutate(nature_s = recode(nature_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(nature_w = recode(nature_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(weather_s = recode(weather_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(weather_w = recode(weather_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(productive_s = recode(productive_s,
"Not productive at all" = 1,
"Somewhat productive" = 2,
"Moderately productive" = 3,
"Very productive" = 4)) %>%
mutate(productive_w = recode(productive_w,
"Not productive at all" = 1,
"Somewhat productive" = 2,
"Moderately productive" = 3,
"Very productive" = 4)) %>%
mutate(mood_s = recode(mood_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(mood_w = recode(mood_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(energy_s = recode(energy_s,
"Not sufficient at all" = 1,
"Somewhat sufficient" = 2,
"Moderately sufficient" = 3,
"Very sufficient" = 4)) %>%
mutate(energy_w = recode(energy_w,
"Not sufficient at all" = 1,
"Somewhat sufficient" = 2,
"Moderately sufficient" = 3,
"Very sufficient" = 4)) %>%
mutate(outhob_s = recode(outhob_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(outhob_w = recode(outhob_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(inhob_s = recode(inhob_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(inhob_w = recode(inhob_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(getby_s = recode(getby_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(getby_w = recode(getby_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(loss_s = recode(loss_s,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4)) %>%
mutate(loss_w = recode(loss_w,
"Rarely or never" = 1,
"Once a week" = 2,
"A few days a week" = 3,
"Nearly everyday" = 4))
I ran the code below to obtain some basic descriptive statistics of the data.
summary(sw_survey)
Timestamp nature_s nature_w weather_s weather_w productive_s productive_w mood_s mood_w energy_s
Length:34 Min. :1.000 Min. :1 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :3.000 Min. :1.000 Min. :2.000
Class :character 1st Qu.:3.000 1st Qu.:1 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:3.000
Mode :character Median :3.500 Median :2 Median :4.000 Median :2.500 Median :3.500 Median :2.000 Median :4.000 Median :3.000 Median :3.000
Mean :3.382 Mean :2 Mean :3.441 Mean :2.324 Mean :3.324 Mean :2.294 Mean :3.676 Mean :2.647 Mean :3.382
3rd Qu.:4.000 3rd Qu.:3 3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000
Max. :4.000 Max. :4 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000
energy_w outhob_s outhob_w inhob_s inhob_w getby_s getby_w loss_s loss_w
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:2.000
Median :2.000 Median :3.000 Median :1.500 Median :3.000 Median :3.000 Median :1.500 Median :3.000 Median :1.000 Median :3.000
Mean :2.176 Mean :3.265 Mean :1.853 Mean :2.676 Mean :3.118 Mean :1.706 Mean :2.618 Mean :1.294 Mean :2.559
3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:1.000 3rd Qu.:3.000
Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000 Max. :3.000 Max. :4.000
Then I ran correlation tests for each of the question pairs. The null hypothesis is that there is no statistically significant difference between the responses to questions (activity level, mood, loss of interest) for the summer versus the winter. The alternative hypothesis is that there is a statistically significant difference in responses for summer and winter.
The code below is a correlation test for how often people enjoy nature in the summer vs the winter. The results show a degrees of freedom of 32, a t value of 1.6, and a p-value of 0.12. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of 0.27 indicates a weak correlation between the two variables.
cor.test(sw_survey$nature_s, sw_survey$nature_w)
Pearson's product-moment correlation
data: sw_survey$nature_s and sw_survey$nature_w
t = 1.6165, df = 32, p-value = 0.1158
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.06989875 0.56081883
sample estimates:
cor
0.2747616
The code below is a correlation test for how often people enjoy the weather in the summer vs the winter. The results show a degrees of freedom of 32, a t value of -0.9, and a p-value of 0.33. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of -0.17 indicates a weak negative correlation between the two variables.
cor.test(sw_survey$weather_s, sw_survey$weather_w)
Pearson's product-moment correlation
data: sw_survey$weather_s and sw_survey$weather_w
t = -0.98612, df = 32, p-value = 0.3315
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.4819120 0.1766941
sample estimates:
cor
-0.171733
The code below is a correlation test for how productive people feel they are in the summer vs the winter. The results show a degrees of freedom of 32, a t value of -3.5, and a p-value of 0.0014. According to the p-value, these results indicate that I am forced to reject the null hypothesis, meaning that there is a statistically significant difference between summer and winter for this question. The correlation of -0.5 indicates a moderate negative correlation between the two variables.
cor.test(sw_survey$productive_s, sw_survey$productive_w)
Pearson's product-moment correlation
data: sw_survey$productive_s and sw_survey$productive_w
t = -3.4942, df = 32, p-value = 0.001415
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.7333586 -0.2278456
sample estimates:
cor
-0.5255202
The code below is a correlation test for how often people are ‘in a good mood’ in the summer vs the winter. The results show a degrees of freedom of 32, a t value of 0.04, and a p-value of 0.96. According to the p-value, these results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of 0.007 indicates a very weak correlation between the two variables.
cor.test(sw_survey$mood_s, sw_survey$mood_w)
Pearson's product-moment correlation
data: sw_survey$mood_s and sw_survey$mood_w
t = 0.043289, df = 32, p-value = 0.9657
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.3313710 0.3449254
sample estimates:
cor
0.007652227
The code below is a correlation test for how people rate their energy levels in the summer vs the winter. The results show a degrees of freedom of 32, a t value of -1.6, and a p-value of 0.12. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of -0.27 indicates a weak negative correlation between the two variables.
cor.test(sw_survey$energy_s, sw_survey$energy_w)
Pearson's product-moment correlation
data: sw_survey$energy_s and sw_survey$energy_w
t = -1.5898, df = 32, p-value = 0.1217
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.55769374 0.07442243
sample estimates:
cor
-0.2705523
The code below is a correlation test for how often people enjoy outdoor hobbies in the summer vs the winter. The results show a degrees of freedom of 32, a t value of 0.5, and a p-value of 0.6. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of 0.09 indicates a weak correlation between the two variables.
cor.test(sw_survey$outhob_s, sw_survey$outhob_w)
Pearson's product-moment correlation
data: sw_survey$outhob_s and sw_survey$outhob_w
t = 0.53871, df = 32, p-value = 0.5938
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.2514231 0.4195192
sample estimates:
cor
0.09480297
The code below is a correlation test for how often people enjoy indoor hobbies in the summer vs the winter. The results show a degrees of freedom of 32, a t value of 3.02, and a p-value of 0.005. These results indicate that I am forced to reject the null hypothesis, meaning that there is a statistically significant difference between summer and winter for this question. The correlation of 0.47 indicates a moderate correlation between the two variables.
cor.test(sw_survey$inhob_s, sw_survey$inhob_w)
Pearson's product-moment correlation
data: sw_survey$inhob_s and sw_survey$inhob_w
t = 3.0205, df = 32, p-value = 0.00493
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.1580125 0.6979989
sample estimates:
cor
0.47101
The code below is a correlation test for how often people feel that they are ‘just trying to get by’ in the summer vs the winter. The results show a degrees of freedom of 32, a t value of -0.76, and a p-value of 0.45. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of -0.13 indicates a weak negative correlation between the two variables.
cor.test(sw_survey$getby_s, sw_survey$getby_w)
Pearson's product-moment correlation
data: sw_survey$getby_s and sw_survey$getby_w
t = -0.75709, df = 32, p-value = 0.4545
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.4506052 0.2151646
sample estimates:
cor
-0.1326531
The code below is a correlation test for how often people experience a loss of interest in the summer vs the winter. The results show a degrees of freedom of 32, a t value of 1.9, and a p-value of 0.06. These results indicate that I fail to reject the null hypothesis, meaning that there is no statistically significant difference between summer and winter for this question. The correlation of 0.3 indicates a weak correlation between the two variables.
cor.test(sw_survey$loss_s, sw_survey$loss_w)
Pearson's product-moment correlation
data: sw_survey$loss_s and sw_survey$loss_w
t = 1.9696, df = 32, p-value = 0.05759
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.01051738 0.60023988
sample estimates:
cor
0.3288178
Then I created a boxplot with a linear regression for each pair of questions.
The first code below created a box plot with a linear regression for how often people enjoy nature in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = nature_s, y = nature_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often people enjoy nature in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how often people enjoy the weather in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = weather_s, y = weather_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often people enjoy the weather in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how productive people feel they are in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = productive_s, y = productive_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How productive are people in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
`
The code below created a box plot with a linear regression for how often people feel that they are ‘in a good mood’ in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = mood_s, y = mood_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often people feel like they are in a 'good mood' in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how people rate their energy levels in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = energy_s, y = energy_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How people rate their energy levels in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how often people enjoy outdoor hobbies in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = outhob_s, y = outhob_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often do people enjoy outdoor hobbies during summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how often people enjoy indoor hobbies in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = inhob_s, y = inhob_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often do people enjoy indoor hobbies during summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how often people feel they are ‘just trying to get by’ in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = getby_s, y = getby_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often people feel they are 'just trying to get by' in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?
The code below created a box plot with a linear regression for how often people experience a loss of interest in the summer vs the winter.
sw_survey %>%
ggplot(aes(x = loss_s, y = loss_w)) +
geom_boxplot() +
geom_jitter(width = .1) +
theme_minimal() +
geom_smooth(formula = y~x, method = lm, se = FALSE) +
labs(title = "How often people experience a loss of interest in summer vs winter", x = "summer", y = "winter")
Warning: Continuous x aesthetic -- did you forget aes(group=...)?