SRTB_ab {ExtDist}R Documentation

The symmetric-reflected truncated beta (SRTB) distribution.

Description

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.

Usage

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.

Details

No details as of yet.

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.

Author(s)

Haizhen Wu.

See Also

ExtDist for other standard distributions.

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"]
est.par[attributes(est.par)$par.type=="shape"]

# log-likelihood function
lSRTB_ab(X,param = est.par)

[Package ExtDist version 0.7-2 Index]