resid.etas | R Documentation |
A function to compute and plot spatial and temporal residuals as well as transformed times for a fitted ETAS model.
resid.etas(fit, type="raw", n.temp=1000, dimyx=NULL)
fit |
A fitted ETAS model. An object of class |
type |
A character string specifying the type residuals to be
computed. Options are |
n.temp |
An integer specifying the number of partition points for temporal residuals. |
dimyx |
Dimensions of the discretization for the smoothed spatial residuals. A numeric vector of length 2. |
The function computes the temporal residuals
R^{temp}(I_j, h) = ∑_{i=1}^{N} δ_i 1[t_i \in I_j] h(t_i) λ^{temp}(t_i|H_{t_i}) - \int_{I_j} h(t)λ^{temp}(t|H_t) d t
for I_j=((j-1)T/n.temp, jT/n.temp], j=1,...,n.temp, and the (smoothed version of) spatial residuals
R^{spat}(B_j, h) = h(\tilde{x}_i, \tilde{y}_i) λ^{spat}(\tilde{x}_i, \tilde{y}_i)(\tilde{δ}_i - \tilde{w}_i)
for a Berman-Turner quadrature scheme with quadrature points (\tilde{x}_i, \tilde{y}_i) and quadrature weights \tilde{w}_i, i=1,...,n.spat. Raw, reciprocal and Pearson residuals obtain with h=1, h=1/λ and h=1/√{λ}, respectively.
In addition, the function computes transformed times
τ_j=\int_{0}^{t_j} λ^{temp}(t|H_t) d t
and
U_j = 1 - \exp(-(t_j - t_{j-1}))
The function produces plots of temporal and smoothed spatial residuals, transformed times τ_j against j and Q-Q plot of U_j.
It also returns a list with components
tau the transformed times
U related quantities with the transformed times
tres the temporal residuals
sres the smoothed spatial residuals
Abdollah Jalilian jalilian@razi.ac.ir
Baddeley A, Rubak E, Turner R (2015). Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press, London. http://www.crcpress.com/Spatial-Point-Patterns-Methodology-and-Applications-with-R/Baddeley-Rubak-Turner/9781482210200/.
Baddeley A, Turner R (2000). Practical Maximum Pseudolikelihood for Spatial Point Patterns. Australian & New Zealand Journal of Statistics, 42(3), 283–322. doi: 10.1111/1467-842X.00128.
Baddeley A, Turner R, Moller J, Hazelton M (2005). Residual Analysis for Spatial Point Processes. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(5), 617–666. doi: 10.1111/j.1467-9868.2005.00519.x.
Ogata Y (1988). Statistical Models for Earthquake Occurrences and Residual Analysis for Point Processes. Journal of the American Statistical Association, 83(401), 9–27. doi: 10.2307/2288914.
Zhuang J (2006). Second-order Residual Analysis of Spatiotemporal Point Processes and Applications in Model Evaluation Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(4), 635–653. doi: 10.1111/j.1467-9868.2006.00559.x.
etas
iran.cat <- catalog(iran.quakes, time.begin="1973/01/01", study.start="1986/01/01", study.end="2016/01/01", lat.range=c(26, 40), long.range=c(44, 63), mag.threshold=5) print(iran.cat) ## Not run: plot(iran.cat) ## End(Not run) # setting initial parameter values param0 <- c(0.46, 0.23, 0.022, 2.8, 1.12, 0.012, 2.4, 0.35) # fitting the model ## Not run: iran.fit <- etas(iran.cat, param0=param0) # diagnostic plots resid.etas(iran.fit) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.