Package 'GRTo'

Title: Tools for the Analysis of Gutenberg-Richter Distributions of Earthquake Magnitudes
Description: Offers functions for the comparison of Gutenberg-Richter b-values. Several functions in GRTo are helpful for the assessment of the quality of seismicity catalogs.
Authors: Daniel Amorese, Paul A. Rydelek and Jean-Robert Grasso
Maintainer: Daniel C. Amorese <[email protected]>
License: GPL
Version: 1.3
Built: 2024-11-17 06:27:32 UTC
Source: CRAN

Help Index


Gutenberg-Richter Tools

Description

Gutenberg-Richter Tools for the analyzis of the properties of distributions of earthquakes in magnitude. Some functions in this package are helpful for the comparison of Gutenberg-Richter b-values. The Schuster's function can be used to highlight blast contamination in earthquake catalogs.

Details

Package: GRTo
Type: Package
Version: 1.3
Date: 2015-09-16
License: GPL
LazyLoad: yes

Note

Thanks to Paul Friberg (ISTI) for telling us about the bug in the graphical part of bvmed.R. Thanks to Scott Kostyshak (Princeton University) for telling us about the extra bootstrap package dependency. GRTo version 1.2 fixes the issues reported by Paul and Scott. Thanks to Andrew Barbour (USGS) for detecting and fixing minor problems of bvmed.R of version 1.2. In version 1.3, the b-value and an optional staircase line FMD are displayed by BBootComp when a single magnitude file is processed. Version 1.3 also fixes a bug with negative magnitude values. In version 1.3, an option coded by Andrew Barbour allows the processing of data from a list. Willy Aspinall (University of Bristol) highlights bugs in the graphical parts of bvmed and BBootComp: An inappropriate magnitude shift in FMD plots is definitely fixed in version 1.3. Many thanks to Willy!

Author(s)

Daniel Amorese <[email protected]>, Paul A. Rydelek <[email protected]> and Jean-Robert Grasso <[email protected]>

Maintainer: Daniel Amorese <[email protected]>

References

D. Amorese, "Applying a change-point detection method on frequency-magnitude distributions", Bull. seism. Soc. Am. (2007) 97, doi:10.1785\/0120060181

D. Amorese, J.-R. Grasso and P. A. Rydelek, "On varying b-values with depth: results from computer-intensive tests for Southern California", Geophys. J. Int. (2010) 180, 347-360

Rydelek, P. A. and Hass, L. (1994) On Estimating the Amount of Blasts in Seismic Catalogs with Schuster's Method Bulletin of the Seismological Society of America, Vol. 84, No. 4, pp. 1256-1259.

Siegel, A.F., "Robust regression using repeated medians", Biometrika (1982) 69, 242-244.

Zurn, W. and Rydelek, P. A. (1996) Revisiting the phasor-walkout method for detailed investigation of harmonic signals in time series Surveys in Geophysics, Vol. 15, No. 4, pp. 409-431.

Examples

# Comparison of the b-value for the IDYLLdeep data set.
    BBootComp(finame1=system.file("extdata","IDYLLdeep.data.txt",package="GRTo"),
    finame2=NULL, colid1=15, colid2=NULL,nrep=200,alter=NULL,findtm1=TRUE,
    findtm2=NULL,plot=TRUE, title="IDYLLWILD", tm1=NULL,tm2=NULL)

Bootstrap test for the comparison of Gutenberg-Richter b-values

Description

This function computes Gutenberg-Richter b-values, as well as their uncertainties. The comparison of 2 b-values are performed through a bootstrap test.

Usage

BBootComp(finame1, finame2 = NULL, colid1 = 1, colid2 = 1, hd1 = FALSE, 
hd2 = FALSE, nrep = 5000, alter = c("two.sided", "less", "greater"), 
tm1 = NULL, tm2 = NULL, findtm1 = TRUE, findtm2 = TRUE, plot = FALSE, 
title = "BootComp",oplt="p")

Arguments

finame1

a character string specifying the first file to be loaded

finame2

an optional character string specifying the second file to be loaded. See 'Details'

colid1

field number for the magnitude values in finame1

colid2

an optional field number for the magnitude values in finame2. See 'Details'

hd1

logical. Whether finame1 contains headers or not

hd2

logical. Whether finame2 contains headers or not

nrep

number of replicates for the bootstrap

alter

a character string specifying the alternative hypothesis, must be one of '"two.sided"' (default), '"greater"' or '"less"'. You can specify just the initial letter

tm1

threshold magnitude value for the first data set. If tm1 is NULL and findtm1 is FALSE, the function considers that the data set has been already truncated after the threshold magnitude value (i. e. your data set shows only the linear part of the FMD)

tm2

an optional threshold magnitude value for the second data set. If tm2 is NULL and findtm2 is FALSE, the function considers that the data set has been already truncated after the threshold magnitude value (i. e. your data set shows only the linear part of the FMD)

findtm1

logical. Whether an automatic procedure is engaged to determine the threshold magnitude value tm1 or not

findtm2

logical. Whether an automatic procedure is engaged to determine the threshold magnitude value tm2 or not

plot

logical. If TRUE, a FMD plot is drawn. Default is plot equals FALSE

title

character. The title of the plot. The name for the PNG file that includes the plot begins with title

oplt

character. Option for the plot. If oplt is "p", the FMD displays points (open triangles), else it shows a staircase. This option applies only to the plot of a single FMD: When 2 FMDs are compared, they are always shown with point symbols

Details

if 'finame2' is not NULL, this function compares 2 sets of magnitude values that are contained in 2 different files. Otherwise, only the FMD for data in 'finame1' is analyzed.

Value

A list containing the following components:

val

object of class htest containing the results of the bootstrap test

b1

b-value for the first data set

b2

b-value for the second data set

sd1

standard-error of the b-value for the first data set

sd2

standard-error of the b-value for the second data set

m01

threshold magnitude for the first data set

m02

threshold magnitude for the second data set

a1

a-value for the first data set. This value is not corrected for time, e. g. this is not the seismic productivity per year

a2

a-value for the second data set. This value is not corrected for time, e. g. this is not the seismic productivity per year

Author(s)

Daniel Amorese <[email protected]>, Paul A. Rydelek <[email protected]> and Jean-Robert Grasso <[email protected]>

Maintainer: Daniel Amorese <[email protected]>

References

D. Amorese, "Applying a change-point detection method on frequency-magnitude distributions", Bull. seism. Soc. Am. (2007) 97, doi:10.1785\/0120060181

D. Amorese, J.-R. Grasso and P. A. Rydelek, "On varying b-values with depth: results from computer-intensive tests for Southern California", Geophys. J. Int. (2010) 180, 347-360

See Also

utcomp

Examples

BBootComp(finame1=system.file("extdata","IDYLLshal.data.txt",package="GRTo"),
    finame2=NULL, colid1=15, colid2=NULL,nrep=200,alter=NULL,findtm1=TRUE,
    findtm2=NULL,plot=TRUE, title="IDYLLWILD", tm1=NULL,tm2=NULL)

Repeated medians regression for the determination of the Gutenberg-Richter b-value

Description

This function determines the Gutenberg-Richter b-value from a set of magnitude values, using the repeated medians regression method.

Usage

bvmed(file, lis, hd = FALSE, colid = 1, nrep = 200, tm = NULL,
findtm = TRUE, title = "bvmed")

Arguments

file

file to be loaded

lis

list to be loaded

hd

whether file contains header or not

colid

field number for the magnitude values in file

nrep

number of replicates for the bootstrap (calculation of the standard-error for the b-value)

tm

threshold magnitude value

findtm

logical. Whether an automatic procedure is engaged to determine the threshold magnitude value tm or not

title

character. The title of the plot. The name for the PNG file that includes the plot begins with title

Details

This function reads magnitude values in the field which number is indicated by colid in file. Magnitude values are read in the list lis if the file does not exist. This function produces a plot showing the FMD and the linear model line. The plot is stored into a file with name file_bvmed.png (png format file). It includes the mblm function from the version 0.11 (2007) of the mblm library by Lukasz Komsta (known e-mail address : [email protected]).

Value

A list containing the following components:

quantm

the 5%, 50% and 95% quantiles of the bootstrap replicates for the threshold magnitude value

mmed

the median of the bootstrap replicates for the threshold magnitude value

quantb

the 5%, 50% and 95% quantiles of the bootstrap replicates for the b-value

valid

the number of valid replicates

brm

the b-value

bse

the bootstrap standard-error value for the b-value

bme

the bootstrap margin of errors value for the b-value

Note

Thanks to Paul Friberg for telling us about the bug in the graphical part of bvmed.R. Thanks to Scott Kostyshak for telling us about the extra bootstrap package dependency. GRTo version 1.2 fixes these issues. Thanks to Andrew Barbour (USGS) for detecting and fixing minor problems of bvmed.R of version 1.2. In version 1.3, an option coded by Andrew Barbour allows the processing of data from a list. Willy Aspinall (University of Bristol) highlights bugs in the graphical parts of bvmed: An inappropriate magnitude shift in the FMD plot is definitely fixed in version 1.3. Many thanks to Willy!

Author(s)

Daniel Amorese <[email protected]>, Paul A. Rydelek <[email protected]> and Jean-Robert Grasso <[email protected]>

Maintainer: Daniel Amorese <[email protected]>

References

D. Amorese, J.-R. Grasso and P. A. Rydelek, "On varying b-values with depth: results from computer-intensive tests for Southern California", Geophys. J. Int. (2010) 180, 347-360

Siegel, A.F., "Robust regression using repeated medians", Biometrika (1982) 69, 242-244.

Examples

bvmed(file=system.file("extdata","IDYLLdeep.data.txt",package="GRTo"), colid = 15, nrep = 150, 
tm = NULL, findtm = TRUE, title = "IDYLLWILD")

Analysis of Discontinuities in Frequency Magnitude Distributions

Description

This function finds significant discontinuities in Frequency Magnitude Distributions (FMD).

Usage

fmddisc(file, header = FALSE, colid = 1, nrep = 200, title = "fmddisc")

Arguments

file

filename of the file to be loaded

header

whether file contains headers or not

colid

field number for the magnitude values in file

nrep

number of replicates for the bootstrap

title

main title for the plot

Details

This function reads magnitude values in the field which number is indicated by colid in file. The function returns values of significant magnitude discontinuities (e. g. deviations from linearity) in the FMD. A bootstrap procedure is used to obtain the 90% confidence interval for magnitude discontinuities. We assumed the distribution of the nrep bootstrap replicates is not skewed. Therefore, the 90% confidence interval is simply formed by taking 5% and 95% quantiles of the bootstrap replicates as the lower and upper bound of the interval respectively. These values and the 50% quantile (median) are returned in a list by the function. The function also returns bootstrap mean and bootstrap standard-error (standard deviation of bootstrap replicate estimates). The bootstrap margin of errors at the 90% normal confidence level is returned as the result of 1.645 \* bootstrap standard-error. The function produces a plot showing the FMD and histograms of magnitude values for the significant discontinuities in the FMD. The plot is stored into a file with name file\_disc.png (png format file). Values of counts in histograms are controlled by the number of replicates nrep that are used.

Value

This function returns a list containing the following components:

quant1

the 5%, 50% and 95% quantiles of the bootstrap replicates for the main discontinuity

valid

the numbers of valid replicates

bmean

the bootstrap mean values

bse

the bootstrap standard-error values

bme

the bootstrap margin of errors values

quant2

the 5%, 50% and 95% quantiles of the bootstrap replicates for the auxiliary discontinuity

Note

Thanks to Scott Kostyshak for telling us about the extra bootstrap package dependency. GRTo version 1.2 fixes this issue.

Author(s)

Daniel Amorese

References

D. Amorese, "Applying a change-point detection method on frequency-magnitude distributions", Bull. seism. Soc. Am. (2007) 97, doi:10.1785\/0120060181

Examples

fmddisc(file=system.file("extdata","IDYLLdeep.data.txt",package="GRTo"),
header=FALSE,colid=15,nrep=200,"FMD mag discontinuities")

Plot of a phasor walkout for the Schuster's test

Description

This function plots a phasor walkout for the Schuster's test.

Usage

schuster(finame, title = "Schuster's diagram", color = c("black","red","orange",
"green","cyan","navy"), hd = FALSE, colidye = NULL, colidmo = NULL, colidda = NULL, 
colidho = 1, colidmi = 2, colidma = 3, colidz = NULL, utccor = 0, dayt1 = NULL, 
dayt2 = NULL, ysel1 = NULL, ysel2 = NULL, mosel1 = NULL, mosel2 = NULL, 
dasel1 = NULL, dasel2 = NULL, magsel1 = NULL, magsel2 = NULL, zsel1 = NULL, 
zsel2 = NULL, weekday1 = c("mo","tu","we","th","fr","sa","su"), 
weekday2 = c("mo","tu","we","th","fr","sa","su"))

Arguments

finame

name of the file to be loaded

title

main title that will appear in the phasor walkout plot

color

color of the phasor walkout (black/red/orange/green/cyan/navyblue). The first letter is enough to discriminate the color name

hd

logical. Whether finame contains headers or not

colidye

field number for the year values in the loaded file

colidmo

field number for the month values in the loaded file

colidda

field number for the day values in the loaded file

colidho

field number for the hour values in the loaded file

colidmi

field number for the minute values in the loaded file

colidma

field number for the magnitude values in the loaded file

colidz

field number for the depth values in the loaded file

utccor

correction for local time. This value and values of the start and end hours of nighttime are used to filter the daytime seismic noise from the walkout plot

dayt1

the start hour of nighttime in local time

dayt2

the end hour of nighttime in local time

ysel1

minimum year value for selection (Default is NULL, e. g. no selection)

ysel2

maximum year value for selection (Default is NULL, e. g. no selection)

mosel1

minimum month value for selection (Default is NULL, e. g. no selection)

mosel2

maximum month value for selection (Default is NULL, e. g. no selection)

dasel1

minimum day value for selection (Default is NULL, e. g. no selection)

dasel2

maximum day value for selection (Default is NULL, e. g. no selection)

magsel1

minimum magnitude value for selection (Default is NULL, e.g. no selection)

magsel2

maximum magnitude value for selection (Default is NULL, e.g. no selection)

zsel1

minimum depth value for selection (Default is NULL, e. g. no selection)

zsel2

maximum depth value for selection (Default is NULL, e. g. no selection)

weekday1

first day in the week for selection ("mo" for "Monday", "tu" for "Tuesday", "we" for "Wednesday", "th" for "Thursday", "fr" for "Friday", "sa" for "Saturday", "su" for "Sunday")

weekday2

last day in the week for selection ("mo" for "Monday", "tu" for "Tuesday", "we" for "Wednesday", "th" for "Thursday", "fr" for "Friday", "sa" for "Saturday", "su" for "Sunday")

Details

This function reads earthquake times (hour and minutes values are required) in an input file and plots a phasor walkout into a file with name file\_schu.png (png format file). Selections can be performed based on ranges in hour of the day, year, month, day, magnitude, depth and day of the week (in the same week). The correction for local time is such that GMT time + correction (e. g. utccor) = local time.

Author(s)

Daniel Amorese \& Paul A. Rydelek

References

Rydelek, P. A. and Hass, L. (1994) On Estimating the Amount of Blasts in Seismic Catalogs with Schuster's Method Bulletin of the Seismological Society of America, Vol. 84, No. 4, pp. 1256-1259.

Zurn, W. and Rydelek, P. A. (1996) Revisiting the phasor-walkout method for detailed investigation of harmonic signals in time series Surveys in Geophysics, Vol. 15, No. 4, pp. 409-431.

Examples

schuster(finame=system.file("extdata","IDYLLdeep.data.txt",package="GRTo"), 
title = "Schuster's diagram", hd = FALSE, colidye = 1, color="n", colidmo = 2, 
colidda = 3, colidho = 4, colidmi = 5, colidma = 15, colidz = 9, utccor = -9, 
dayt1 = NULL, dayt2 = NULL, ysel1 = 1983, ysel2 = 1990, mosel1 = NULL, 
mosel2 = NULL, dasel1 = NULL, dasel2 = NULL, magsel1 = NULL, magsel2 = NULL, 
zsel1 = NULL, zsel2 = NULL, weekday1 = NULL, weekday2 = NULL)

p-value for the Utsu's test

Description

This function calculates the p-value for the Utsu's test from 2 values of b and 2 sample sizes.

Usage

utcomp(b1, n1, b2, n2)

Arguments

b1

b-value from the first sample

n1

size of the first sample (number of data above or equal to the threshold magnitude in the first data set)

b2

b-value from the second sample

n2

size of the second sample (number of data above or equal to the threshold magnitude in the second data set)

Details

The formula is given in Utsu's (1992, 1999).

Value

utcomp returns the p-value of the Utsu's test for the comparison of 2 b-values.

Author(s)

Daniel Amorese

References

Utsu, T. (1992) Introduction to seismicity, Surijishingaku (Mathematical Seismology), Inst. Statis. Math, 34, (VII), 139-157, (in Japanese).

Utsu, T. (1999) Representation and analysis of the earthquake size distribution: a historical review and some new approaches, Pure appl. Geophys., 155, 509-535

See Also

BBootComp

Examples

# Utsu's \emph{p}-value for the comparison of 2 \emph{b}-values in the Santa Paula area.
utcomp(0.97,366,0.77,1161)