-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysingSimulations.Rmd
More file actions
50 lines (36 loc) · 887 Bytes
/
analysingSimulations.Rmd
File metadata and controls
50 lines (36 loc) · 887 Bytes
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
---
title: "Analysing data"
author: "Alexis Derumigny"
date: "03/03/2022"
output:
pdf_document: default
html_document: default
---
```{r setup, include=TRUE}
library(tidyverse)
```
We first load the data of the simulations that we did.
```{r loading data}
source("loadingData.R")
```
We can now print the summary statistics.
```{r summary}
summarisedData %>%
select(all_of(c("n", "h", "MSE", "meanComputationTime")))
```
We plot now the mean-squared error as a function of the bandwidth $h$.
```{r}
summarisedData %>%
ggplot(aes(x = h, y = MSE)) +
geom_line() +
scale_x_log10() +
scale_y_log10()
```
We can also plot the distribution of the computation time as a function of $h$.
```{r}
totalData %>%
mutate( h_ = factor(h, levels = sort(unique(h))) ) %>%
ggplot(aes(x = h_, y = computationTime)) +
geom_boxplot() +
ylab("Computation time (s)")
```