Learn R Programming

ForestFit (version 0.6.1)

pjsb: Computing the cumulative distribution function of Johnson's SB (JSB) distribution

Description

Computes the cumulative distribution function of the four-parameter JSB distibution given by $$ F\bigl(x\big|\Theta\bigr) = \int_{\xi}^{x}\frac {\delta \lambda}{\sqrt{2\pi}(u-\xi)(\lambda+\xi-u)}\exp\Biggl\{-\frac{1}{2}\Bigg[\gamma+\delta\log \biggl(\frac{u-\xi}{\lambda+\xi-u}\biggr) \Bigg]^2\Biggr\} du, $$ where \(\xi<x<\lambda+\xi\), \(\Theta=(\delta,\gamma,\lambda,\xi)^T\) with \(\delta, \lambda> 0\), \(-\infty<\gamma<\infty\), and \(-\infty<\xi<\infty\).

Usage

pjsb(data, param, log.p = FALSE, lower.tail = TRUE)

Arguments

data

Vector of observations.

param

Vector of the parameters \(\delta\), \(\gamma\), \(\lambda\), and \(\xi\).

log.p

If TRUE, then log(cdf) is returned.

lower.tail

If FALSE, then 1-cdf is returned.

Value

A vector of length n, giving random generated values from JSB distribution.

Examples

Run this code
# NOT RUN {
data<-rnorm(10)
param<-c(delta<-1, gamma<-3, lambda<-12, xi<-5)
pjsb(data, param, log.p = FALSE, lower.tail = TRUE)
# }

Run the code above in your browser using DataLab