-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulation_eval.R
20 lines (16 loc) · 930 Bytes
/
simulation_eval.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require(reshape)
require(ggplot2)
require(sjPlot)
require(psych)
# loading data
cr <- read.table(paste(getwd(),"cr_sims.txt",sep="/"), header=T, quote="\"")
meu <- read.table(paste(getwd(), "meuse_sims.txt",sep="/"), header=T, quote="\"")
# reshaping data because of visualization in ggplot
cr.melt <- melt(cr)
meu.melt <- melt(meu)
##### violin plot ####
v1 <- sjp.grpfrq(cr.melt$value, cr.melt$variable, type="v", axisLabels.x=c("Overal errors (%)", "Real errors (%)", "Ratio of real to systematic errors"), hideLegend = T, showTableSummary = F, title = "Distribution of Errors | PM10 \n")
v2 <- sjp.grpfrq(meu.melt$value, meu.melt$variable, type="v", axisLabels.x=c("Overal errors (%)", "Real errors (%)", "Ratio of real to systematic errors"), hideLegend = T, showTableSummary = F, title = "Distribution of Errors | meuse \n")
#### descriptive statistics ####
describe(cr); sapply(cr, IQR)
describe(meu); sapply(meu, IQR)