knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ lubridate 1.9.3     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
sleep_data <- read.csv("downloads/Sleep_health_and_lifestyle_dataset.csv")
sleep_data

For my project, I have (for now) chosen to work on a dataset that explains the quality of sleep of 374 adults between the ages of 27 and 59. I I obtained my dataset from kaggle: https://www.kaggle.com/datasets/uom190346a/sleep-health-and-lifestyle-dataset

My data set includes 13 variables, and has 374 observations. I will use sleep quality as my response variable, and use the rest of variables to see how the affect this. These other variables are the predictor variables.

I have 11 predictor variables: gender, age, occupation, sleep duration, physical activity level, stress level, BMI category, blood pressure, heart rate, daily steps and sleep disorder.

I have 5 categorical variables: gender, occupation, stress level, BMI category and sleep disorder. I have 6 numerical variables: Age, sleep duration, physical activity level, stress level, blood pressure, heart rate and daily steps.

I haven’t found any missing data.

I’m interested in seeing how variables like physical activity and BMI/health affect my response variable, sleep quality. The categorical variables will be best answered with a classification approach. The numerical variables will be best answered with a regression approach. I think daily steps and heart rate will be the most useful. My model will use a combination of descriptive, inferential and maybe predictive. I will use trendline to follow and/or explain linearity, inferential to test the hypothesis I will have, and predictive to try to predict the quality of sleep based on the predictive variables.

TIMELINE In the first two weeks, I’ll download and load the dataset, ensuring successful import of 374 observations. The subsequent two weeks will be dedicated to preliminary exploratory data analysis (EDA), including the examination of variable distributions and relationships between predictor variables and the response variable (sleep quality). Moving into weeks five and six, I’ll build regression and classification models, evaluating performance and using descriptive statistics to explain observed relationships. Weeks seven and eight will involve inferential analysis and hypothesis testing, while weeks nine and ten will focus on predictive modeling and validation using cross-validation techniques. In the final two weeks, I’ll synthesize key findings, prepare visualizations, and document results and conclusions in a concise report that also addresses limitations.

I don’t have any questions yet, but I am concerned that there could still be something wrong with my dataset. My response variable is a number between 1 and 10, with reported values being between 4 and 9. My other options are an NFL statistics dataset and an obesity levels dataset: https://www.kaggle.com/datasets/nickcantalupa/nfl-team-data-2003-2023 https://www.kaggle.com/code/mpwolke/obesity-levels-life-style/notebook