Frequency-Magnitude Distributions
Distributions
MagnitudeDistributions.GRclassic — TypeGRclassic(b, M0)The classic Gutenberg-Richter law can be expressed as an exponential distribution with rate β and location M0:
\[f(x; \beta, M_{0}) = \beta e^{-\beta (x-M_{0})}, \quad x ≥ M_{0}\]
M0 is the minimum magnitude. β and the b-value b are linked by the following relation: $\beta = blog(10)$.
GRclassic(1.0, 0.5) # distribution with a b-value of 1 and minimum magnitude of 0.5
bvalue(d) # get the b-value
rate(d) # get β
location(d) # get M0
params(d) # get the parameters (b, M0)Distribution fitting
Distributions.fit_mle — Methodfit_mle(D::Type{<:GRclassic}, mags, M0)Use the maximum likelihood method to determine the GRclassic distribution fitting the input data. The function calculates the b-value with the method of Aki-Utsu.
Arguments
D: distribution type (seeGRclassic(b, M0)).mags: array storing magnitude values greater than or equal to the magnitude of completenessM0.M0: magnitude of completeness. See Magnitude of completeness for methods that can be used to estimate it.
The standard error affecting the b-value can be estimated with fit_stderr(D::Type{<:GRclassic}, mags)
References
- Aki, 1965. Maximum Likelihood Estimate of b in the Formula logN=a-bM and its Confidence Limits. Belletin of the Earthquake Research Institute, 43, 237-239.
- Utsu 1966. A Statistical Significance Test of the Difference in b-value between Two Earthquake Groups. Journal of Physics of the Earth, 14, 37-40.
MagnitudeDistributions.fit_binned — Methodfit_binned(D::Type{<:GRclassic}, mags, M0, ΔM)Determine the GRclassic distribution fitting the input data. This function corresponds to the method of Tinti and Mulargia, which was designed to properly estimate the b-value from binned magnitude values.
Arguments
D: distribution type (seeGRclassic(b, M0)).mags: array storing binned magnitude values greater than or equal to the magnitude of completenessM0M0: magnitude of completeness. See Magnitude of completeness for methods that can be used to estimate it.ΔM: bin width used to group the magnitude values.`
The standard error affecting the b-value can be estimated with fit_stderrbinned(D::Type{<:GRclassic}, mags, ΔM)
References
- Tinti and Mulargia, 1987. Confidence intervals of b values for grouped magnitudes. Bulletin of the Seismological Society of America, 77 (6), 2125–2134.
MagnitudeDistributions.fit_stderr — Functionfit_stderr(D::Type{<:GRclassic}, mags)Apply the method of Shi and Bolt to calculate the standard error affecting a b-value determined with the method of Aki-Utsu fit_mle(D::Type{<:GRclassic}, mags, M0).
Arguments
D: distribution type (seeGRclassic(b, M0)).mags: array storing magnitude values greater than or equal to the magnitude of completeness.
References
- Shi and Bolt, 1982. The standard error of the magnitude-frequency b value. Bulletin of the Seismological Society of America, 72, 1677-1687.
MagnitudeDistributions.fit_stderrbinned — Functionfit_stdbinned(D::Type{<:GRclassic}, mags, ΔM)Calculate the standard error affecting a b-value estimated with the method of Tinti and Mulargia (fit_binned(D::Type{<:GRclassic}, mags, M0, ΔM)).
Arguments
D: distribution type (seeGRclassic(b, M0)).mags: array storing magnitude values greater than or equal to the magnitude of completeness.ΔM: bin width used to group the magnitude values.`
References
- Tinti and Mulargia, 1987. Confidence intervals of b values for grouped magnitudes. Bulletin of the Seismological Society of America, 77 (6), 2125–2134.
Sampling
Base.rand — Methodrand(rng::AbstractRNG, d::UnivariateDistribution)Generate a scalar sample from d. The general fallback is quantile(d, rand()).
Parameter Retrieval
StatsBase.params — Methodparams(d::UnivariateDistribution)Return a tuple of parameters. Let d be a distribution of type D, then D(params(d)...) will construct exactly the same distribution as $d$.
Distributions.scale — Methodscale(d::UnivariateDistribution)Get the scale parameter.
Distributions.location — Methodlocation(d::UnivariateDistribution)Get the location parameter.
Distributions.rate — Methodrate(d::UnivariateDistribution)Get the rate parameter.
MagnitudeDistributions.bvalue — Methodbvalue(::UnivariateDistribution)Get the b-value
Probability Evaluation
Distributions.pdf — Methodpdf(d::UnivariateDistribution, x::Real)Evaluate the probability density (mass) at x.
See also: logpdf.
Distributions.logpdf — Methodlogpdf(d::UnivariateDistribution, x::Real)Evaluate the logarithm of probability density (mass) at x.
See also: pdf.
Distributions.cdf — MethodDistributions.logcdf — Methodlogcdf(d::UnivariateDistribution, x::Real)The logarithm of the cumulative function value(s) evaluated at x, i.e. log(cdf(x)).
Distributions.ccdf — Methodccdf(d::UnivariateDistribution, x::Real)The complementary cumulative function evaluated at x, i.e. 1 - cdf(d, x).
Distributions.logccdf — Methodlogccdf(d::UnivariateDistribution, x::Real)The logarithm of the complementary cumulative function values evaluated at x, i.e. log(ccdf(x)).
Misc
MagnitudeDistributions.avalue — Methodavalue(::UnivariateDistribution, N::Real, ΔM::Real)Get the a-value of a frequency-magnitude distribution composed of N events grouped into magnitude bins of width ΔM.