Introduction

Provide a brief introduction to your research question. Summarize the empirical articles you reviewed.

Literature Review

Article 1 Summary

Summarize the empirical article you selected. Discuss the key findings.

Article 2 Summary

Summarize the empirical article you selected. Discuss the key findings.

Hypothesis

Any increase in positive physical or mental activity will lead to an increase in academic preformance. # Method

Sample

This data contains 2,000 records of students’ habits across study, extracurricular, sleep, socializing, and physical activities. Each student’s stress level is derived based on study and sleep hours.

Variables and Operationalization

Independent variables include study time, sleep hours, personal time, physical activity, and the dependent variables were stress level and GPA. ## Loading Required Libraries

# Load necessary libraries
library(ggplot2)
library(dplyr)
library(psych)
library(knitr)
library(readxl)
library(openxlsx)
# Load your dataset in this chunk


student_data <- read.xlsx("C:/Users/cjc19/OneDrive/Documents/Downloads/asas/student_lifestyle_dataset.xlsx")

Descriptive Statistics

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
describe(student_data)
##                                 vars    n    mean     sd  median trimmed    mad
## Student_ID                         1 2000 1000.50 577.49 1000.50 1000.50 741.30
## Study_Hours_Per_Day                2 2000    7.48   1.42    7.40    7.47   1.78
## Extracurricular_Hours_Per_Day      3 2000    1.99   1.16    2.00    1.99   1.48
## Sleep_Hours_Per_Day                4 2000    7.50   1.46    7.50    7.50   1.93
## Social_Hours_Per_Day               5 2000    2.70   1.69    2.60    2.66   2.08
## Physical_Activity_Hours_Per_Day    6 2000    4.33   2.51    4.10    4.21   2.82
## GPA                                7 2000    3.12   0.30    3.11    3.11   0.31
## Stress_Level*                      8 2000    1.82   0.91    1.00    1.78   0.00
##                                  min  max   range  skew kurtosis    se
## Student_ID                      1.00 2000 1999.00  0.00    -1.20 12.91
## Study_Hours_Per_Day             5.00   10    5.00  0.03    -1.18  0.03
## Extracurricular_Hours_Per_Day   0.00    4    4.00  0.00    -1.18  0.03
## Sleep_Hours_Per_Day             5.00   10    5.00 -0.01    -1.21  0.03
## Social_Hours_Per_Day            0.00    6    6.00  0.18    -1.12  0.04
## Physical_Activity_Hours_Per_Day 0.00   13   13.00  0.40    -0.44  0.06
## GPA                             2.24    4    1.76  0.03    -0.38  0.01
## Stress_Level*                   1.00    3    2.00  0.36    -1.69  0.02

Statistical Analysis

Analysis

Perform your chosen analysis. Make sure your output shows.

clean_data <- na.omit(student_data)
clean_data <- student_data[is.finite(student_data$Stress_Level), ]

"Stress_Level" %in% names(student_data)
## [1] TRUE
mod.MR <- lm(Stress_Level ~ Study_Hours_Per_Day + Extracurricular_Hours_Per_Day + Sleep_Hours_Per_Day + Social_Hours_Per_Day, data = student_data)
## Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...): NA/NaN/Inf in 'y'
mod.MRgpa <- lm(GPA ~ Study_Hours_Per_Day + Extracurricular_Hours_Per_Day + Sleep_Hours_Per_Day + Social_Hours_Per_Day, data = student_data)

summary(mod.MR)
## Error: object 'mod.MR' not found
summary(mod.MRgpa)
## 
## Call:
## lm(formula = GPA ~ Study_Hours_Per_Day + Extracurricular_Hours_Per_Day + 
##     Sleep_Hours_Per_Day + Social_Hours_Per_Day, data = student_data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.59447 -0.13516 -0.00293  0.13439  0.78728 
## 
## Coefficients:
##                                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    2.007303   0.037815  53.082   <2e-16 ***
## Study_Hours_Per_Day            0.154384   0.003213  48.046   <2e-16 ***
## Extracurricular_Hours_Per_Day -0.007496   0.003960  -1.893   0.0585 .  
## Sleep_Hours_Per_Day           -0.004549   0.003161  -1.439   0.1503    
## Social_Hours_Per_Day           0.001312   0.002788   0.471   0.6380    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2026 on 1995 degrees of freedom
## Multiple R-squared:  0.541,  Adjusted R-squared:   0.54 
## F-statistic: 587.8 on 4 and 1995 DF,  p-value: < 2.2e-16

Post-hoc Power Analysis

Run a post-hoc power analysis with the pwr package. Use the pwr.f2.test function for multiple regression power analysis.

library(pwr)
## Warning: package 'pwr' was built under R version 4.4.3
pwr.f2.test(
  u = 4,                     
  v = 100 - 4 - 1,           
  f2 = 0.15 / (1 - 0.15),    
  sig.level = 0.05            
)
## 
##      Multiple regression power calculation 
## 
##               u = 4
##               v = 95
##              f2 = 0.1764706
##       sig.level = 0.05
##           power = 0.9256193

Results Interpretation

Results are interpreted clearly using APA style; connection to hypothesis is made; statistical significance and practical implications are addressed; power level is addressed.

Graph and Table

Include at least one table and one graph that effectively summarize your analysis and findings. Use R code chunks to generate these visualizations.

library(ggplot2)



ggplot(student_data, aes(x = stress_level)) +
  geom_histogram(fill = "lightblue", color = "black", bins = 15) +
  labs(title = "Distribution of Stress Levels", 
       x = "Stress Level", y = "Count") +
  theme_minimal()
## Error in `geom_histogram()`:
## ! Problem while computing aesthetics.
## ℹ Error occurred in the 1st layer.
## Caused by error:
## ! object 'stress_level' not found
ggplot(student_data, aes(x = study_hours, y = stress_level)) +
  geom_point(color = "darkred", alpha = 0.6) +
  geom_smooth(method = "lm", se = FALSE, color = "blue") +
  labs(title = "Study Hours vs Stress Level", 
       x = "Study Hours", y = "Stress Level") +
  theme_minimal()
## Error in `geom_point()`:
## ! Problem while computing aesthetics.
## ℹ Error occurred in the 1st layer.
## Caused by error:
## ! object 'study_hours' not found
summary_table <- student_data %>%
  select(where(is.numeric)) %>% 
  pivot_longer(everything(), names_to = "Variable", values_to = "Value") %>%
  group_by(Variable) %>%
  summarise(
    Mean = round(mean(Value, na.rm = TRUE), 2),
    SD = round(sd(Value, na.rm = TRUE), 2),
    Min = min(Value, na.rm = TRUE),
    Max = max(Value, na.rm = TRUE),
    N = n())
## Error in pivot_longer(., everything(), names_to = "Variable", values_to = "Value"): could not find function "pivot_longer"
print(summary_table)
## Error: object 'summary_table' not found

Discussion

Discuss the implications of your results for psychological theory or practice. Address the following points:

  • Implications: What do your findings mean in the context of existing research?
  • Limitations: Identify any limitations of your study. How might these limitations have affected your results?
  • Future Directions: Suggest potential future research directions based on your findings.

References

List the articles you reviewed in APA format. Do not worry about the indentations.