Title: | Estimation and Other Tools for Skew-Unit Models |
---|---|
Description: | Provide estimation and data generation tools for the skew-unit family discussed based on Mukhopadhyay and Brani (1995) <doi:10.2307/2348710>. The family contains extensions for popular distributions such as the ArcSin discussed in Arnold and Groeneveld (1980) <doi:10.1080/01621459.1980.10477449>, triangular, U-quadratic and Johnson-SB proposed in Cortina-Borja (2006) <doi:10.1111/j.1467-985X.2006.00446_12.x> distributions, among others. |
Authors: | Diego Gallardo [aut, cre], Emilio Gomez-Deniz [aut], Osvaldo Venegas [aut], Hector W. Gomez [aut] |
Maintainer: | Diego Gallardo <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-02-20 19:20:28 UTC |
Source: | CRAN |
Density, distribution function and random generation for the ArcSin distribution.
dasin(x, log=FALSE) pasin(q, lower.tail=TRUE, log.p=FALSE) rasin(n)
dasin(x, log=FALSE) pasin(q, lower.tail=TRUE, log.p=FALSE) rasin(n)
x , q
|
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
The ArcSin distribution has density
and cumulative distribution function
dasin gives the density, pasin gives the distribution function, and rasin generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo
Arnold, B.C. and Groeneveld, R.A. (1980). Some Properties of the Arcsine Distribution. Journal of the Ammerican Statistical Association, 75, 173-175.
dasin(0.5) pasin(0.5) rasin(5)
dasin(0.5) pasin(0.5) rasin(5)
choose.skewunit select a combination of and
in a Family of Skew Distributions with Bounded Support
based on the Akaike information criteria (AIC) or Bayesian information criteria (BIC).
choose.skewunit(x, criteria="AIC")
choose.skewunit(x, criteria="AIC")
x |
data in |
criteria |
criteria to choose a model: AIC (default) or BIC. |
The Family of Skew Distributions with Bounded Support is defined by its density function given by
where is symmetric around 0.5, i.e.,
.
The avaliable options for family1 and family2 are asin, Uquad, triang, JSB and sbeta.
an object of class "skewunit" is returned. The object returned for this functions is a list containing the following components:
x |
x |
Diego Gallardo, Emilio Gomez-Deniz, Osvaldo Venegas and Hector W. Gomez
set.seed(2100) x=rskewunit(100, lambda=-0.5, delta=1.2, family1="asin", family2="triang") aux=choose.skewunit(x, criteria="AIC") aux aux$summary
set.seed(2100) x=rskewunit(100, lambda=-0.5, delta=1.2, family1="asin", family2="triang") aux=choose.skewunit(x, criteria="AIC") aux aux$summary
cuberoot(x) computes the cubic root of x, .
cuberoot(x)
cuberoot(x)
x |
a numeric or complex vector or array. |
the cube root of a number.
Diego Gallardo
cuberoot(-27) cuberoot(0) cuberoot(64)
cuberoot(-27) cuberoot(0) cuberoot(64)
Perform parameter estimation for a family of skew distributions with bounded support.
estimate.skewunit(x, family1 = "asin", family2 = "asin", est.var = TRUE)
estimate.skewunit(x, family1 = "asin", family2 = "asin", est.var = TRUE)
x |
data in |
family1 |
first family of distributions related to |
family2 |
first family of distributions related to |
est.var |
logical; if TRUE, estimate the standard errors of the estimators. |
The Family of Skew Distributions with Bounded Support is defined by its density function given by
where is symmetric around 0.5, i.e.,
.
The avaliable options for family1 and family2 are asin, Uquad, triang, JSB and sbeta.
an object of class "skewunit" is returned. The object returned for this functions is a list containing the following components:
x |
x |
Diego Gallardo, Emilio Gomez-Deniz, Osvaldo Venegas and Hector W. Gomez
set.seed(2100) x=rskewunit(100, lambda=-0.5, delta=1.2, family1="asin", family2="JSB") estimate.skewunit(x, family1="asin", family2="JSB")
set.seed(2100) x=rskewunit(100, lambda=-0.5, delta=1.2, family1="asin", family2="JSB") estimate.skewunit(x, family1="asin", family2="JSB")
distribution.
Density, distribution function and random generation for the Johnson distribution.
dJSB(x, delta=1, log=FALSE) pJSB(q, delta=1, lower.tail=TRUE, log.p=FALSE) rJSB(n, delta=1)
dJSB(x, delta=1, log=FALSE) pJSB(q, delta=1, lower.tail=TRUE, log.p=FALSE) rJSB(n, delta=1)
x , q
|
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
delta |
shape parameter (by default is 1). |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
The Johnson distribution has density
where ,
denotes the density of the
standard normal distribution and
. Its cumulative distribution function is
where is the cumulative distribution function of the
standard normal distribution.
dJSB gives the density, pJSB gives the distribution function, and rJSB generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo
Kotz, S., van Dorp, J.R. (2004). Beyond Beta. Other Continuous Families of Distributions with Bounded Support and Applications. World Scientific.
dJSB(0.5, 1.2) pJSB(0.5, 0.5) rJSB(5, 1.5)
dJSB(0.5, 1.2) pJSB(0.5, 0.5) rJSB(5, 1.5)
Density, distribution function and random generation for the symmetrical beta distribution.
dsbeta(x, delta=1, log=FALSE) psbeta(q, delta=1, lower.tail=TRUE, log.p=FALSE) rsbeta(n, delta=1)
dsbeta(x, delta=1, log=FALSE) psbeta(q, delta=1, lower.tail=TRUE, log.p=FALSE) rsbeta(n, delta=1)
x , q
|
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
delta |
shape parameter (by default is 1). |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
The symmetrical beta distribution has density
where denotes the beta function. Its cumulative distribution function is
dsbeta gives the density, psbeta gives the distribution function, and rsbeta generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo
dsbeta(0.5, 1.2) psbeta(0.5, 0.5) rsbeta(5, 1.5)
dsbeta(0.5, 1.2) psbeta(0.5, 0.5) rsbeta(5, 1.5)
Density and random generation for a family of skew distributions with bounded support.
dskewunit(x, lambda = 0, delta = 1, delta2 = 1, family1 = "asin", family2 = "asin", log = FALSE) rskewunit(n, lambda = 0, delta = 1, delta2 = 1, family1 = "asin", family2 = "asin")
dskewunit(x, lambda = 0, delta = 1, delta2 = 1, family1 = "asin", family2 = "asin", log = FALSE) rskewunit(n, lambda = 0, delta = 1, delta2 = 1, family1 = "asin", family2 = "asin")
x |
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
lambda |
skewness parameter such as |
delta , delta2
|
shape parameters. |
family1 |
first family of distributions related to |
family2 |
second family of distributions related to |
log |
logical; if TRUE, probabilities p are given as log(p). |
The Family of Skew Distributions with Bounded Support is defined by its density function given by
where is symmetric around 0.5, i.e.,
.
The avaliable options for family1 and family2 are asin, Uquad, triang, JSB and sbeta.
dskewunit gives the density, and rskewunit generates random deviates. The length of the result is determined by n for rnorm, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo, Emilio Gomez-Deniz, Osvaldo Venegas and Hector W. Gomez
dskewunit(c(0.2,0.8), lambda = 0.5, family1 = "asin", family2 = "asin") rskewunit(100, lambda = -0.4, delta = 1, family1 = "triang", family2 = "JSB")
dskewunit(c(0.2,0.8), lambda = 0.5, family1 = "asin", family2 = "asin") rskewunit(100, lambda = -0.4, delta = 1, family1 = "triang", family2 = "JSB")
Density, distribution function and random generation for the triangular distribution.
dtriang(x, log=FALSE) ptriang(q, lower.tail=TRUE, log.p=FALSE) rtriang(n)
dtriang(x, log=FALSE) ptriang(q, lower.tail=TRUE, log.p=FALSE) rtriang(n)
x , q
|
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
The triangular distribution has density
and cumulative distribution function
dtriang gives the density, ptriang gives the distribution function, and rtriang generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo
dtriang(0.5) ptriang(0.5) rtriang(5)
dtriang(0.5) ptriang(0.5) rtriang(5)
Density, distribution function and random generation for the U-quadratic distribution.
dUquad(x, a=0, b=1, log=FALSE) pUquad(q, a=0, b=1, lower.tail=TRUE, log.p=FALSE) rUquad(n, a=0, b=1)
dUquad(x, a=0, b=1, log=FALSE) pUquad(q, a=0, b=1, lower.tail=TRUE, log.p=FALSE) rUquad(n, a=0, b=1)
x , q
|
vector of quantiles. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
a , b
|
range of variable x. ( |
log , log.p
|
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
The U-quadratic distribution has density
where and
. Its cumulative distribution function is
dUquad gives the density, pUquad gives the distribution function, and rUquad generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Diego Gallardo
dUquad(0.5) pUquad(0.5) rUquad(5)
dUquad(0.5) pUquad(0.5) rUquad(5)