Learn R Programming

etasFLP (version 1.0.3)

plot.etasclass: Plot method for etasclass objects

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

## S3 method for class 'etasclass':
plot(x,pdf=FALSE,file ="etasplot", ngrid=201,flag.3D=TRUE,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.
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.

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.gridx grid values.
  • y.gridy grid values.
  • back.gridbackground intensity estimated on a ngrid x ngrid grid.
  • trig.gridtriggered intensities estimated on a grid of ngrid x ngrid points.
  • tot.gridtotal intensities estimated on a grid of ngrid x ngrid points.
  • back.gridbackground space intensity estimated for observed points.
  • trig.gridtriggered space intensities estimated for observed points.
  • tot.gridtotal space intensities estimated for observed points.

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 pdf=TRUE intensities are printed on a pdf file, as spcified by file; otherwise default screen device is used.

See Also

etasclass, eqcat, profile.etasclass

Examples

Run this code
data("italycatalog")
# load a sample catalog of the italian seismicity

class(italycatalog)<-"eqcat"

etas3.1<-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(etas3.1)

# profile likelihood for the 5-th parameter (a), with plot:

prof=profile(etas3.1,nprofile=7,iprofile=5)
plot(prof)

Run the code above in your browser using DataLab