library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(readxl)
Training <- read_excel("C:/Users/celin/OneDrive/Desktop/Applied Quant Class/Training.xls")
View(Training)
Training_Cleaned<-Training
Training_Cleaned$`All Students (7/1/2018 - 6/30/2022)`<-as.numeric(Training_Cleaned$`All Students (7/1/2018 - 6/30/2022)`)
## Warning: NAs introduced by coercion
Training_Cleaned$`Percent Received Credential`<-as.numeric(Training_Cleaned$`Percent Received Credential`)
## Warning: NAs introduced by coercion
Training_Cleaned$`All Students Percent Successfully Completed`<-as.numeric(Training_Cleaned$`All Students Successfully Completed Program(7/1/2018 - 6/30/2022)`)
## Warning: NAs introduced by coercion
Training_Cleaned_Filtered<-Training_Cleaned %>% select(`County`,`Provider
Name`,`All Students (7/1/2018 - 6/30/2022)`,`Percent Received Credential`,`All Students Percent Successfully Completed`) %>% na.omit
Training_New<-Training_Cleaned_Filtered %>% select(`All Students (7/1/2018 - 6/30/2022)`,`All Students Percent Successfully Completed`)
cor(Training_New)
## All Students (7/1/2018 - 6/30/2022)
## All Students (7/1/2018 - 6/30/2022) 1.0000000
## All Students Percent Successfully Completed 0.7941963
## All Students Percent Successfully Completed
## All Students (7/1/2018 - 6/30/2022) 0.7941963
## All Students Percent Successfully Completed 1.0000000
pairs(Training_New)

cor.test(Training_Cleaned_Filtered$`All Students (7/1/2018 - 6/30/2022)`,Training_Cleaned_Filtered$`All Students Percent Successfully Completed`,method="pearson")
##
## Pearson's product-moment correlation
##
## data: Training_Cleaned_Filtered$`All Students (7/1/2018 - 6/30/2022)` and Training_Cleaned_Filtered$`All Students Percent Successfully Completed`
## t = 57.119, df = 1910, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.7770322 0.8101803
## sample estimates:
## cor
## 0.7941963