fitbayesJSB {ForestFit} | R Documentation |
Estimating parameters of the Johnson's SB (JSB) distribution using the Bayesian approach
Description
Suppose x=(x_1,\dots,x_n)^T
denotes a vector of n
independent observations coming from a four-parameter JSB distribution with probability density function given given by
f\bigl(x\big|\Theta\bigr) = \frac {\delta \lambda}{\sqrt{2\pi}(x-\xi)(\lambda+\xi-x)}\exp\Biggl\{-\frac{1}{2}\Bigg[\gamma+\delta\log \biggl(\frac{x-\xi}{\lambda+\xi-x}\biggr) \Bigg]^2\Biggr\},
where \xi<x<\lambda+\xi
, \Theta=(\delta,\gamma,\lambda,\xi)^T
with \delta, \lambda> 0
, -\infty<\gamma<\infty
, and -\infty<\xi<\infty
. Using the Bayesian approach, we compute the Bayes' estimators of the JSB distribution parameters.
Usage
fitbayesJSB(data, n.burn=8000, n.simul=10000)
Arguments
data |
Vector of observations. |
n.burn |
Length of the burn-in period, i.e., the point after which Gibbs sampler is supposed to attain convergence. By default |
n.simul |
Total numbers of Gibbs sampler iterations. By default |
Details
The Bayes' estimators are obtained by averaging on the all iterations between n.burn
and n.simul
.
Value
A list of objects in two parts as
Bayes' estimators of the parameters.
A sequence of four goodness-of-fit measures consist of Anderson-Darling (
AD
), Cram\'eer-von Misses (CVM
), Kolmogorov-Smirnov (KS
), and log-likelihood (log-likelihood
) statistics.
Author(s)
Mahdi Teimouri
References
N. L. Johnson, 1949. Systems of frequency curves generated by methods of translation, Biometrika, 36, 149–176.
L. J. Norman, S. Kotz, and N. Balakrishnan, 1994. Continuous Univariate Distributions, volume I, John Wiley & Sons.
Examples
# Here we use the SW dataset provided by FIA that represents a typical loblolly pine plantation.
# As the variable of interest, we fit the JSB distribution to the diameter at breast height (SW$DIA)
# in inches.
data(SW)
data<-SW$DIA
fitbayesJSB(data, n.burn=4000, n.simul=5000)