Density, distribution, quantile, random number generation and parameter estimation functions for the SRTB distribution. Parameter estimation can be based on a weighted or unweighted i.i.d. sample and can be carried out numerically.

dSRTB_ab(
  x,
  shape1 = 2,
  shape2 = 3,
  a = 0,
  b = 1,
  params = list(shape1, shape2, a, b),
  ...
)

pSRTB_ab(
  q,
  shape1 = 2,
  shape2 = 3,
  a = 0,
  b = 1,
  params = list(shape1 = 2, shape2 = 5, a = 0, b = 1),
  ...
)

qSRTB_ab(
  p,
  shape1 = 2,
  shape2 = 3,
  a = 0,
  b = 1,
  params = list(shape1 = 2, shape2 = 5, a = 0, b = 1),
  ...
)

rSRTB_ab(
  n,
  shape1 = 2,
  shape2 = 3,
  a = 0,
  b = 1,
  params = list(shape1, shape2, a, b),
  ...
)

eSRTB_ab(X, w, method = "numerical.MLE", ...)

lSRTB_ab(
  X,
  w,
  shape1 = 2,
  shape2 = 3,
  a = 0,
  b = 1,
  params = list(shape1, shape2, a, b),
  logL = TRUE,
  ...
)

Arguments

x, q

A vector of quantiles.

shape1, shape2

Shape parameters.

a, b

Boundary parameters.

params

A list that includes all named parameters.

...

Additional parameters.

p

A vector of probabilities.

n

Number of observations.

X

Sample observations.

w

An optional vector of sample weights.

method

Parameter estimation method.

logL

logical; if TRUE, lSRTB_ab gives the log-likelihood, otherwise the likelihood is given.

Value

dSRTB_ab gives the density, pSRTB_ab the distribution function, qSRTB_ab gives the quantile function, rSRTB_ab generates random variables, and eSRTB_ab estimates the parameters. lSRTB_ab provides the log-likelihood function and sSRTB_ab the score function.

Details

No details as of yet.

See also

ExtDist for other standard distributions.

Author

Haizhen Wu.

Examples

# Parameter estimation for a distribution with known shape parameters
X <- rSRTB_ab(n=500, shape1=2, shape2=10, a=1, b=2)
est.par <- eSRTB_ab(X)
plot(est.par) 


# Extracting boundary and shape parameters
est.par[attributes(est.par)$par.type=="boundary"]
#> $a
#> [1] 1.023013
#> 
#> $b
#> [1] 1.995441
#> 
est.par[attributes(est.par)$par.type=="shape"]
#> $shape1
#> [1] 1.666173
#> 
#> $shape2
#> [1] 1.113721
#> 

# log-likelihood function
lSRTB_ab(X,param = est.par)
#> [1] 60.51107