plot.etasclass: Plot method for etasclass objects

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/plot.etasclass.R

Description

This is the main method to visualize graphically the output of an object of class etasclass.

By default the space-time region is the same used for the estimation of the ETAS model. Background, triggered and total space intensities are also plotted for a grid of values.

Usage

1
2
3
## S3 method for class 'etasclass'
plot(x,pdf=FALSE,file ="etasplot", 
ngrid=201,nclass=10,tfixed=0,flag.3D=FALSE,flag.log=FALSE,...)

Arguments

x

an etaclass object.

pdf

If TRUE, then 2D plots are sent to a pdf file

file

name of the pdf file

ngrid

number of points for each direction (x, y) of a ngrid*ngrid grid where estimated intensities must be evaluated. Default value= 201.

nclass

number of class for each direction (x, y) of a grid of nclass*nclass cells where estimated intensities must be evaluated. Must divide ngrid-1. Default value= 10.

tfixed

If a positive value is given, then the triggered intensity at time tfixed is estimated and visualized.

flag.3D

If TRUE a 3D plot is also produced.

flag.log

If TRUE then a log scale is used to plot intensities.

...

other arguments.

Details

Different plots of the output of an object of class etasclass.

By default the space-time region is the same used for the estimation of the ETAS model. Background, triggered and total space intensities are also computed and plotted for a grid of values.

If a positive value is given for tfixed, then the triggered intensity at time tfixed is estimated and visualized. A tipical use can be with tfixed a day after a big earthquake.

Starting with the package version 1.2.0 different kind of residual analysis are computed and visualized, separately for the space and time dimensions. (8 plot on three windows for the space and 2 plots on one window for the time)

For space dimension,

Space residuals are computed dividing the observed rectangular space area in a equally spaced grid of nclass intervals for each dimension, so to divide the observed space area in nclass x nclass rectangular cells. We obtain the classical comparison between observed and theoretical frequencies. All frequencies are related to the whole time interval (and thus theoretical frequencies are obtained integrating estimated intensities with respect to time).

Fifth graph (image plot)

We define nclass x nclass standardized residuals:

z_{\ell j} \ = \frac{n_{\ell j}-\hat{ν}_{\ell j}}{√{\hat{ν}_{\ell j}}} \qquad (\ell =1,2,...,nclass; \ j=1,2,...,nclass)

For each cell lj we have observed (n_{\ell j}) and theoretical frequency (\hat{ν}_{\ell j}).

Sixth graph (image plot)

We used a similar technique to compute residuals for the background seismicity only, to check if at least the estimation of the background component is appropriate. To this purpose the observed background frequencies ({}_b n_{ \ell j}) are now computed by the sum of the estimated weights rho.weights and the theoretical background frequency {}_b \hat{ν}_{\ell j} by the estimated marginal space background intensity in each cell.

From these quantities we obtain nclass x nclass standardized residuals for the background intensity only:

{}_b z_{\ell j} \ = \frac{{}_b n_{\ell j} \ - \ {}_b \hat{ν}_{\ell j}}{√{{}_b \hat{ν}_{\ell j}}} \qquad (\ell =1,2,...,nclass; \ j=1,2,...,nclass)

seventh plot: (space intensities (integrated over time))

A 3x2 plot: first column for observed vs.theoretical , second column for standardized residuals vs theoretical values. First row for total intensity, second row for background intensity, and third row for their difference, the triggered intensities

eight-th graph:

To check departure of the model for the time dimension, we first integrated the estimated intensity function with respect to the observed space region, so to obtain an estimated time process (a one dimensional ETAS model):

\hat{λ}(t)= \int \int_{Ω_{(x,y)}}\, \hat{λ}(x,y,t)\,d x \, d y

As known, a non-homogeneous time process can be transformed to a homogeneous one through the integral transformation:

τ_i = \int_{t_0}^{t_{i}} \hat{λ}(t) \ d t

Then, a plot of τ_i versus i can give information about the departures of the models in the time dimension. In particular, this plot, together with a plot of the estimated time intensities, drawn on the same graphic winodw, can inform on the time at which departures are more evident

If pdf=TRUE all graphs are printed on a pdf file, as spcified by file; otherwise default screen device is used.

Value

This plot method computes, among others, back.grid, trig.grid, with coordinates x.grid and y.grid used to obtain image plots of background, triggered and total spatial estimated intensities (see etasclass to see the details of the mixed estimation method used).

x.grid

x grid values.

y.grid

y grid values.

back.grid

background intensity estimated on a ngrid x ngrid grid.

trig.grid

triggered intensities estimated on a grid of ngrid x ngrid points.

tot.grid

total intensities estimated on a grid of ngrid x ngrid points.

tfixed

the fixed time for which intensity is estimated and visualized.

totfixed.grid

total intensities estimated on a grid of ngrid x ngrid points at time tfixed.

back.grid

background space intensity estimated for observed points.

trig.grid

triggered space intensities estimated for observed points.

tot.grid

total space intensities estimated for observed points.

teo1

matrix of nclass*nclass cells with theoretical total space intensities.

teo2

matrix of nclass*nclass cells with theoretical background space intensities.

emp1

matrix of nclass*nclass cells with empirical total space intensities.

emp2

matrix of nclass*nclass cells with empirical background space intensities.

t.trasf

vector of transformed times.

Note

In this first version the x-y space region, where the point process is defined, by default is a rectangle embedding the catalog values.

Author(s)

Marcello Chiodi, Giada Adelfio

References

Adelfio G, Chiodi M (2009).Second-Order Diagnostics for Space-Time Point Processes with Application to Seismic Events. Environmetrics, 20(8), 895-911. doi:10.1002/env.961.

Adelfio G, Chiodi M (2015). FLP Estimation of Semi-Parametric Models for Space-Time Point Processes and Diagnostic Tools. Spatial Statistics, 14(B), 119-132. doi:10.1016/j.spasta.2015.06.004.

Adelfio G, Schoenberg FP (2009). Point Process Diagnostics Based on Weighted Second- Order Statistics and Their Asymptotic Properties. The Annals of the Institute of Statistical Mathematics, 61(4), 929-948. doi:10.1007/s10463-008-0177-1.

Chiodi, M. and Adelfio, G., (2017) Mixed Non-Parametric and Parametric Estimation Techniques in R Package etasFLP for Earthquakes' Description. Journal of Statistical Software, vol. 76 (3), pp. 1-28. DOI: 10.18637/jss.v076.i03.

See Also

etasclass, eqcat, profile.etasclass

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
data("italycatalog")
# load a sample catalog of the italian seismicity

class(italycatalog)<-"eqcat"

etas.flp<-etasclass(italycatalog,description="etas flp",magn.threshold=3.1,thinning=FALSE,flp=TRUE,
is.backconstant=FALSE,magn.threshold.back=3.5,sectoday=TRUE,
onlytime=FALSE,declustering=TRUE,epsmax=0.00001,
params.ind=c(1,1,1,1,1,1,1,1),k0=0.005,c=0.005,p=1.01,a=1.05,gamma=0.6,q=1.52,d=1.1,
compsqm=TRUE,usenlm=TRUE,ndeclust=15)

# execution of etasclass for events with minimum magnitude of 3.1. 
# The events with magnitude at least 3.5 are used to build a first approximation
# for the background intensity function
# (magn.threshold.back=3.5)


# plot method

plot(etas.flp)


## End(Not run)

etasFLP documentation built on May 1, 2019, 6:48 p.m.