-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
101 lines (73 loc) · 3.36 KB
/
README.Rmd
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit the .Rmd file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ETAS.inlabru
<!-- badges: start -->
<!-- badges: end -->
R package that implements the ETAS Hawkes process for modelling seismicity
Online documentation: https://edinburgh-seismicity-hub.github.io/ETAS.inlabru/
## Authors
- [Dr Francesco Serafini](https://scholar.google.com/citations?user=NVDOxTcAAAAJ&hl=en)
- [Dr Mark Naylor](https://blogs.ed.ac.uk/mnaylor/) , School of GeoSciences, University of Edinburgh
- [Prof Finn Lindgren](https://www.maths.ed.ac.uk/~flindgre/) , School of Mathematics, University of Edinburgh
- [Dr Kirsty Bayliss](https://www.linkedin.com/in/kirsty-bayliss-9a6604a1/?originalSubdomain=uk) , Global Earthquake Model (GEM)
## Funding
- This study was funded by yhe Real-Time Earthquake Risk Reduction for a Resilient Europe
[RISE project](http://www.rise-eu.org/home/) , which has received funding from the European
Union's Horizon 2020 Research and Innovation Program under grant Agreement 821115.
- Naylor was additionally funded by the NSFGEO-NERC grant NE/R000794/1.
- Bayliss was funded by an EPSRC Studentship.
## Installation
For ETAS.inlabru to work, we need to install both R-INLA and inlabru:
For inlabru (see https://inlabru-org.github.io/inlabru/):
* CRAN release,
``` r
install.packages("inlabru")
```
* or development version,
``` r
# install.packages("remotes")
remotes::install_github("inlabru-org/inlabru")
```
For R-INLA (see https://www.r-inla.org/download-install):
``` r
install.packages(
"INLA",
repos = c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/testing"),
dep = TRUE
)
```
You can install the development version of ETAS.inlabru from [GitHub](https://github.com/) with
``` r
# install.packages("remotes")
remotes::install_github("edinburgh-seismicity-hub/ETAS.inlabru")
```
## Terminology and planning suggestions
### File structure in package
- ETAS.triggering.function.R : Contains the ETAS specific model functions
- HawkesProcess.R : Generic Hawkes code that is intended for integration back into inlabru
- generateSyntheticCatalogues.R : Contains the iterative Hawkes functions for generating triggered events but the actual triggering functions reside in the ETAS file above so we could introduce other models here
- temporalBinning.R : Code to generate time bins to make integration scheme efficient
- plottingFunctions.R : lets put all the standard plotting functions into here
- setupInlabruInputs.R : Put the functions for generating input.list in here
## Terminology
- Let's be specific about when we are doing just temporal so we have clear function names for the spatial and spatial-temporal later on
- I changed the theta from `c(mu, K, ...)` to a `df <- data.frame(mu=mu, K=K, alpha=alpha, c=c, p=p)`. This means we should refer to the values as `df$mu` which is unambiguous etc
# What has been done
## Implemented
- Generation of synthetic ETAS catalogues by `ETAS.inlabru` with a demonstration in the notebook
## In development
- Add inversion modelling based on original code
- Modify the implementation so that the generic Hawkes code can go into
inlabru and the ETAS triggering function code stay in this package
## Roadmap
- Integrate spatial modelling