Last data update: 2014.03.03

R: The symmetric-reflected truncated beta (SRTB) distribution.
SRTB_abR 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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ExtDist)

Attaching package: 'ExtDist'

The following object is masked from 'package:stats':

    BIC

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ExtDist/SRTB_ab.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SRTB_ab
> ### Title: The symmetric-reflected truncated beta (SRTB) distribution.
> ### Aliases: SRTB_ab dSRTB_ab eSRTB_ab lSRTB_ab pSRTB_ab qSRTB_ab rSRTB_ab
> 
> ### ** 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] 0.9942307

$b
[1] 1.997036

> est.par[attributes(est.par)$par.type=="shape"]
$shape1
[1] 2.143534

$shape2
[1] 141.7393

> 
> # log-likelihood function
> lSRTB_ab(X,param = est.par)
[1] 57.89543
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>