ForestFit (version 0.4)

fitbayesJSB: Estimating parameters of the Johnson's SB (JSB) distribution using the Bayesian approach

Description

Suppose \(y=(y_1,\dots,y_n)^T\) denotes a vector of \(n\) independent observations coming from a four-parameter JSB distribution with pdf given by $$ f\bigl(y\big|\Theta\bigr) = \frac {\delta \lambda}{\sqrt{2\pi}(y-\xi)(\lambda+\xi-y)}\exp\Biggl\{-\frac{1}{2}\Bigg[\gamma+\delta\log \biggl(\frac{y-\xi}{\lambda+\xi-y}\biggr) \Bigg]^2\Biggr\}, $$ where \(\xi<y<\lambda+\xi\) and \(\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(y, n.burn=8000, n.simul=10000)

Arguments

y

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.burn is 8000.

n.simul

Total numbers of Gibbas sampler iterations. By default n.simul is 10,000.

Value

A list of objects in two parts as

  1. Bayes' estimators of the parameters.

  2. 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.

Details

The Bayes' estimators are obtained by averaging on the all iterations between n.burn and n.simul.

References

N. L. Johnson, 1949. Systems of frequency curves generated by methods of translation, Biometrika, 36, 149<U+2013>176.

L. J. Norman, S. Kotz, and N. Balakrishnan, 1994. Continuous Univariate Distributions, volume I, John Wiley & Sons.

Examples

Run this code
# NOT RUN {
n<-20
xi<-0
delta<-2
gamma<-2
lambda<-20
z<-rnorm(n)
y<-xi+lambda/(1+exp(-(z-gamma)/delta))
fitbayesJSB(y, n.burn=50, n.simul=80)
# }

Run the code above in your browser using DataLab