Created
November 2, 2022 16:22
-
-
Save naomispence/b4d5d018c09c60f3b98b5d0979f58ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setwd("~/R_Program_Folder") | |
library(readr) | |
Wave_5_Dataset <- read_csv("Wave_5_Dataset.csv") | |
#load(Wave_5_Dataset) | |
library(Hmisc) | |
library(descr) | |
freq(Wave_5_Dataset$work_pile) | |
freq(Wave_5_Dataset$sad_w5) | |
freq(Wave_5_Dataset$nervous_w5) | |
freq(Wave_5_Dataset$restless_w5) | |
freq(Wave_5_Dataset$hopeless_w5) | |
freq(Wave_5_Dataset$lethargic_w5) | |
freq(Wave_5_Dataset$worthless_w5) | |
freq(Wave_5_Dataset$depression_w5) | |
freq(Wave_5_Dataset$nerves_w5) | |
Wave_5_Dataset$Psychological_Symptoms <- ((Wave_5_Dataset$sad_w5 + Wave_5_Dataset$nervous_w5 + | |
Wave_5_Dataset$restless_w5 + Wave_5_Dataset$hopeless_w5 + Wave_5_Dataset$lethargic_w5 + Wave_5_Dataset$worthless_w5 + Wave_5_Dataset$depression_w5 + Wave_5_Dataset$nerves_w5) /8) | |
freq(Wave_5_Dataset$Psychological_Symptoms) | |
summary(Wave_5_Dataset$Psychological_Symptoms, na.rm = T) | |
sd(Wave_5_Dataset$Psychological_Symptoms, na.rm = T) | |
data.plot.bivariate10<-na.omit(Wave_5_Dataset[,c("work_pile", "Psychological_Symptoms")]) | |
data.plot.bivariate10$work_pile<-as.factor(data.plot.bivariate1$work_pile) | |
levels(data.plot.bivariate10$work_pile)<-c("Yes", "No") | |
ggplot(data=data.plot.bivariate10)+ | |
stat_summary(aes(x=work_pile, y=Psychological_Symptoms, geom="bar")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment