Provide a brief introduction to your research question. Summarize the empirical articles you reviewed.
Summarize the empirical article you selected. Discuss the key findings.
Summarize the empirical article you selected. Discuss the key findings.
Any increase in positive physical or mental activity will lead to an increase in academic preformance. # Method
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.
Independent variables include study time, sleep hours, personal time, physical activity, and the dependent variables were stress level and GPA. ## Loading Required Libraries
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.
## 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
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
##
## 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
Run a post-hoc power analysis with the pwr
package. Use
the pwr.f2.test
function for multiple regression power
analysis.
## Warning: package 'pwr' was built under R version 4.4.3
##
## Multiple regression power calculation
##
## u = 4
## v = 95
## f2 = 0.1764706
## sig.level = 0.05
## power = 0.9256193
Results are interpreted clearly using APA style; connection to hypothesis is made; statistical significance and practical implications are addressed; power level is addressed.
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"
## Error: object 'summary_table' not found
Discuss the implications of your results for psychological theory or practice. Address the following points:
List the articles you reviewed in APA format. Do not worry about the indentations.