-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_istanbul.r
54 lines (32 loc) · 1.31 KB
/
test_istanbul.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
############ Mustafa AKCA ##########
###########################################################
### General Preperation For Analysis ##
###########################################################
# Clear plots
if(!is.null(dev.list())) dev.off()
# Clear console
cat("\014")
# Clean workspace
rm(list=ls())
if(!require(dplyr)){install.packages("dplyr")}
library("dplyr")
if(!require(lattice)){install.packages("lattice")}
library("lattice")
if(!require(pastecs)){install.packages("pastecs")}
library("pastecs")
###########################################################
### Loading Data ##
###########################################################
#Set work directory
setwd("C:/Users/test/Desktop")
isttest =read.csv("istanbultest3.csv")
#colnames(isttest)[2] <- '2020_Beklenen'
#colnames(isttest)[3] <- '2020_Gerceklesen'
#COMPARING MEANS
bwplot(death~category, data= isttest ,xlab="Yillar" , ylab="Olen Kisi Sayisi ", pch= '|')
s=shapiro.test(isttest$death) #It is not Normal distribution (We cannot use parametric tests.)
s$p.value<0.05
res.ftest <- var.test(death~category, data=isttest )
res.ftest$p.value
res <- wilcox.test(death~category, data = isttest, exact = FALSE)
res$p.value