#bd=read.csv("/Users/gabrielmedina/Downloads/Documento s/seguros.csv")


#Entender la base de datos
#summary(bd)
#install.packages("dplyr")
#library(dplyr)

#dplyr es una librería para manipular datos

#count(bd,ClaimStatus, sort=TRUE)
#count(bd,IncidentDate, sort=TRUE)
#count(bd,IncidentDescription, sort=TRUE)
#count(bd,ReturnToWorkDate, sort=TRUE)
#count(bd,ClaimantOpenedDate, sort=TRUE)
#count(bd,ClaimantClosedDate, sort=TRUE)
#count(bd,EmployerNotificationDate, sort=TRUE)
#count(bd,ReceivedDate, sort=TRUE)


#Generar modelo predictivo

#option + ñ
#Regresion=lm(TotalIncurredCost ~ ClaimantAge_at_DOI+Gender+ClaimantType+InjuryNature+BodyPartRegion+BodyPart+AverageWeeklyWage1, data=bd)
#summary(Regresion)

#Regresion_A=lm(TotalIncurredCost ~ ClaimantAge_at_DOI+Gender+ClaimantType+BodyPartRegion+BodyPart+AverageWeeklyWage1, data=bd)
#summary(Regresion_A)
#datos_nuevos2 <- data.frame(ClaimantAge_at_DOI = c(20,30,40,50,60,70,80,90), Gender="Male", ClaimantType="Medical Only",BodyPartRegion="Head",BodyPart="Brain",AverageWeeklyWage1=550)
#predict(Regresion_A,datos_nuevos2)