My research question asks if sleep deprivation has a greater impacts as people age.
The articles I reviewed were of students and how sleep deprivation impacted their cognitive test results.
Sadeh et al. (2003) conducted an experiment with school aged kids to determine the effect of sleep deprivation and neurobehavioral functioning (NBF). The experiment asked seventy-seven school aged children, 39 boys and 38 girls, to participate in the study. The experiment was aimed at the effects of modest sleep manipulation which was more akin to daily life experiences of children. The results suggest that small changes in sleep echoed NBF results and sleep duration. Sleep manipulation effected memory test which indicated that increasing sleep led to improved memory function compared to sleep deprivation or no change. In addition, increase in sleep improved CPT and reaction time compared to when sleep restriction or no change in sleep was noted. This study suggest that sleep duration plays a part in developmental and clinical implications. In addition, the study suggest that children are sensitive to modest changes in sleep duration. And finally, the study suggests that there are consequences to sleep deprivation when it comes to behavioral regulation and may exacerbate developmental psychopathology.
Pilcher and Walters et al. (1997) conducted a study which collected data on sleep deprivation on cognitive performance. The participants where 44 college students, 26 women and 18 men, with a mean age of 20.5 years of age and a SD of 4.37. The researchers used self-diagnosing survey and compared their answers to Watson-Glaser Critical Thinking Appraisal test. The results of study showed that sleep deprived participants of 24 hours scored significantly worse on the WGC than did the nondeprived participants. In addition, the sleep deprived participants reported themselves as having higher levels of concentration than nondeprived participants. The findings also show that sleep deprivation affects mood state, tension, and causes significantly less vigor. The findings suggests that sleep deprivation impairs cognitive tasks, but that the students are unaware of the extent of their impairment.
The less amount of sleep a participant gets per day, and the older a participant is, the greater their reaction time will increase.
Describe the sample used in your study. Include details about the population, sample size, and any relevant demographic information:
The sample will consist of 8000 participants aged 18-59 years old, with 48% female and 48% male with the rest being other. Cognitive performance will be measured using self-reported milliseconds (ms).
List your independent and dependent variables. Explain how each variable was operationalized, including the range for continuous variables and levels for categorical variables:
Independent Variables: • The age of each participant and the daily
amount of sleep each participant had per night, which is in units of
years of age and hours slept. Each participant’s hours slept ranged from
4 to 10 hours.
• Gender, categorical variable with the two levels: male versus female.
Dependent Variable: Reaction Time, operationalized as the number of
seconds spent on a specific task. No expected range, with the higher
time score indicating lower cognitive ability.
# Load your dataset in this chunk
library(readxl)
human_cognitive_Excel <- read_excel("~/Desktop/Psych 214/human_cognitive_Excel.xlsx")
View(human_cognitive_Excel)
## Error in check_for_XQuartz(file.path(R.home("modules"), "R_de.so")): X11 library is missing: install XQuartz from www.xquartz.org
Present the descriptive statistics for your variables. Include appropriate measures of central tendency (mean, median), variability (standard deviation, range), and frequency distributions where applicable. Use R code chunks to generate and display your results.
# Example R code for descriptive statistics
# psych::describe(human_cognitive_Excel)
psych::describe(newdata)
## vars n mean sd median trimmed mad min max range
## Gender* 1 80000 1.56 0.57 2.00 1.52 1.48 1 3.00 2.00
## Age 2 80000 38.53 12.10 39.00 38.53 14.83 18 59.00 41.00
## Sleep_Duration 3 80000 7.01 1.73 7.00 7.01 2.22 4 10.00 6.00
## Reaction_Time 4 80000 399.97 115.37 400.36 399.93 147.61 200 599.99 399.99
## skew kurtosis se
## Gender* 0.41 -0.76 0.00
## Age 0.00 -1.20 0.04
## Sleep_Duration 0.00 -1.20 0.01
## Reaction_Time 0.00 -1.20 0.41
Perform your chosen analysis. Make sure your output shows.
model <- lm(data = newdata,
Reaction_Time ~ Sleep_Duration + Age + Sleep_Duration : Age)
summary(model)
##
## Call:
## lm(formula = Reaction_Time ~ Sleep_Duration + Age + Sleep_Duration:Age,
## data = newdata)
##
## Residuals:
## Min 1Q Median 3Q Max
## -202.263 -99.793 0.342 99.266 202.527
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 402.269841 5.657721 71.101 <2e-16 ***
## Sleep_Duration -0.572941 0.783174 -0.732 0.464
## Age 0.057763 0.140249 0.412 0.680
## Sleep_Duration:Age -0.001882 0.019411 -0.097 0.923
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 115.4 on 79996 degrees of freedom
## Multiple R-squared: 0.000116, Adjusted R-squared: 7.854e-05
## F-statistic: 3.095 on 3 and 79996 DF, p-value: 0.02575
Run a post-hoc power analysis with the pwr
package. Use
the pwr.f2.test
function for multiple regression power
analysis.
##
## Multiple regression power calculation
##
## u = 3
## v = 79996
## f2 = 3.095
## sig.level = 0.05
## power = 1
Results are interpreted clearly using APA style; connection to hypothesis is made; statistical significance and practical implications are addressed; power level is addressed.
Reaction time was regressed on the variables, age and sleep duration. Neither the main effect of age (b = 0.057763), the main effect of sleep duration (b =-0.572941), nor the interaction effect of these two variables (b = -0.001882) were statistically significant at the 0.05 level. F(3, 79996) = 3.095, p-value: 0.02575
Include at least one table and one graph that effectively summarize your analysis and findings. Use R code chunks to generate these visualizations.
#Example R code for creating a graph
# You will be performing a median split
# Median split for Experience to visualize the linear x linear interaction
iris <- iris %>%
mutate(Sepal_Length_Split = ifelse(Sepal.Length > median(Sepal.Length), "Long Sepals", "Short Sepals"))
# Plot the interaction using the median split
ggplot(iris, aes(x = Sepal.Width, y = Petal.Length, color = Sepal_Length_Split)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
labs(title = "Effect of Sepal Width on Petal Length by Sepal Length (Median Split)",
x = "Sepal Width", y = "Petal Length") +
scale_color_manual(values = c("Long Sepals" = "green", "Short Sepals" = "orange")) +
theme_apa()
## Error in contrib.url(repos, "source"): trying to use CRAN without setting a mirror
# Example R code for creating a table
# Create a summary table by Species
summary_table <- iris %>%
group_by(Sepal_Length_Split) %>%
dplyr::summarise(
Petal.Length.Mean = mean(Petal.Length),
Petal.Length.SD = sd(Petal.Length),
Petal.Length.Min = min(Petal.Length),
Petal.Length.Max = max(Petal.Length)
)
summary_table <- newdata %>%
dplyr::summarise(
Sleep_Duration.Mean = mean(Sleep_Duration),
Sleep_Duration.SD = sd(Sleep_Duration),
Sleep_Duration.Min = min(Sleep_Duration),
Sleep_Duration.Max = max(Sleep_Duration)
)
summary_table
## # A tibble: 1 × 4
## Sleep_Duration.Mean Sleep_Duration.SD Sleep_Duration.Min Sleep_Duration.Max
## <dbl> <dbl> <dbl> <dbl>
## 1 7.01 1.73 4 10
## vars n mean sd median trimmed mad min max range
## Gender* 1 80000 1.56 0.57 2.00 1.52 1.48 1 3.00 2.00
## Age 2 80000 38.53 12.10 39.00 38.53 14.83 18 59.00 41.00
## Sleep_Duration 3 80000 7.01 1.73 7.00 7.01 2.22 4 10.00 6.00
## Reaction_Time 4 80000 399.97 115.37 400.36 399.93 147.61 200 599.99 399.99
## skew kurtosis se
## Gender* 0.41 -0.76 0.00
## Age 0.00 -1.20 0.04
## Sleep_Duration 0.00 -1.20 0.01
## Reaction_Time 0.00 -1.20 0.41
# Display the table using knitr::kable()
kable(summary_table, caption = "Descriptive Statistics for Iris Sepal Length")
Sleep_Duration.Mean | Sleep_Duration.SD | Sleep_Duration.Min | Sleep_Duration.Max |
---|---|---|---|
7.005332 | 1.734435 | 4 | 10 |
Discuss the implications of your results for psychological theory or practice. Address the following points:
o Citations: Pilcher, J. J., & Walters, A. S. (1997). How sleep deprivation affects psychological variables related to college students’ cognitive performance. Journal of American College Health, 46(3), 121–126. https://doi.org/10.1080/07448489709595597 Sadeh, A., Gruber, R., & Raviv, A. (2003). The Effects of Sleep Restriction and Extension on School-Age Children: What a Difference an Hour Makes. Child Development, 74(2), 444–455. http://www.jstor.org/stable/3696323