Title: | The Two Parameter Exponential Distribution |
---|---|
Description: | Density, distribution function, quantile function, and random generation function, maximum likelihood estimation (MLE), penalized maximum likelihood estimation (PMLE), the quartiles method estimation (QM), and median rank estimation (MEDRANK) for the two-parameter exponential distribution. MLE and PMLE are based on Mengjie Zheng (2013)<https://scse.d.umn.edu/sites/scse.d.umn.edu/files/mengjie-thesis_masters-1.pdf>. QM is based on Entisar Elgmati and Nadia Gregni (2016)<doi:10.5539/ijsp.v5n5p12>. MEDRANK is based on Matthew Reid (2022)<doi:10.5281/ZENODO.3938000>. |
Authors: | Atchanut Rattanalertnusorn [aut, cre] |
Maintainer: | Atchanut Rattanalertnusorn <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-16 04:01:06 UTC |
Source: | https://github.com/cran/twopexp |
Distribution function plot of the two-parameter exponential distribution with theta
and beta
cdfplot(x, theta, beta)
cdfplot(x, theta, beta)
x |
vector of quantile. |
theta |
location parameter, where |
beta |
scale parameter, where |
a distribution function plot of the two-parameter exponential distribution
x <- seq(0,20,by=0.01) theta <- 6 beta <- 2 cdfplot(x,theta,beta)
x <- seq(0,20,by=0.01) theta <- 6 beta <- 2 cdfplot(x,theta,beta)
Median rank method to estimate parameters of the two-parameter exponential dist.
medrank(x, methods = c("B"))
medrank(x, methods = c("B"))
x |
vector of quantile (or a data set). |
methods |
there are some of median rank methods as follows; "B" stand for Benard median rank method (default), "BL" stand for Blom method, "MKM" stand for Hazen (Modified Kaplan Meier) method, "OT" stand for The one-third method, and "C" stand for Cunane method |
the estimate three values for the two-parameter exponential dist. as follows:
theta.hat
gives the estimate location parameter,
beta.hat
gives the estimate scale parameter,
and lamda.hat
gives the estimate the rate.
Reid, M. (2022). Reliability – a Python library for reliability engineering (Version 0.8.2) [Computer software]. Zenodo. doi:10.5281/ZENODO.3938000.
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set medrank(x1,"B") # Benard method (default) or medrank(x1)
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set medrank(x1,"B") # Benard method (default) or medrank(x1)
To estimate the location (or shift) and scale parameters for the two-parameter exponential distribution
based on maximum likelihood method. See detail in source
mle_tpexp(x, theta = 0, beta = 1)
mle_tpexp(x, theta = 0, beta = 1)
x |
vector of quantile (or a data set). |
theta |
location parameter, where |
beta |
scale parameter, where |
the estimate three values for the two-parameter exponential dist. as follows:
theta.hat
gives the estimate location parameter,
beta.hat
gives the estimate scale parameter,
and lamda.hat
gives the estimate the rate.
Zheng, M. (2013). Penalized Maximum Likelihood Estimation of Two-Parameter Exponential Distributions [Master’s thesis]. https://scse.d.umn.edu/sites/scse.d.umn.edu/files/mengjie-thesis_masters-1.pdf
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set mle_tpexp(x1) x2 <- c(20,15,10,25,35,30,40,70,50,60,90,100,80,5) # test a data set mle_tpexp(x2)
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set mle_tpexp(x1) x2 <- c(20,15,10,25,35,30,40,70,50,60,90,100,80,5) # test a data set mle_tpexp(x2)
Density plot of the two-parameter exponential distribution with theta
and beta
pdfplot(x, theta, beta)
pdfplot(x, theta, beta)
x |
vector of quantile. |
theta |
location parameter, where |
beta |
scale parameter, where |
a density plot of the two-parameter exponential distribution
x <- seq(0,20,by=0.01) theta <- 6 beta <- 2 pdfplot(x,theta,beta)
x <- seq(0,20,by=0.01) theta <- 6 beta <- 2 pdfplot(x,theta,beta)
To estimate the location (or shift) and scale parameters for the two-parameter exponential distribution
based on penalized maximum likelihood method. See detail in source
pmle_tpexp(x, theta = 0, beta = 1)
pmle_tpexp(x, theta = 0, beta = 1)
x |
vector of quantile (or a data set). |
theta |
location parameter, where |
beta |
scale parameter, where |
the estimate three values for the two-parameter exponential dist. as follows:
ptheta.hat
gives the estimate location parameter,
pbeta.hat
gives the estimate scale parameter,
and plamda.hat
gives the estimate the rate.
Zheng, M. (2013). Penalized Maximum Likelihood Estimation of Two-Parameter Exponential Distributions [Master’s thesis]. https://scse.d.umn.edu/sites/scse.d.umn.edu/files/mengjie-thesis_masters-1.pdf
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set pmle_tpexp(x1) x2 <- c(20,15,10,25,35,30,40,70,50,60,90,100,80,5) # test a data set pmle_tpexp(x2)
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set pmle_tpexp(x1) x2 <- c(20,15,10,25,35,30,40,70,50,60,90,100,80,5) # test a data set pmle_tpexp(x2)
To estimate the location (or shift) and scale parameters for the two-parameter exponential distribution
based on quartile method. See detail in source
qm_tpexp(x, methods = c("Q13"))
qm_tpexp(x, methods = c("Q13"))
x |
vector of quantile (or a data set). |
methods |
there are two quartile methods as follows; "Q13" stand for the first and the third quartile method (default), and "Q12" stand for the first and the second quartile (median) method. |
the estimate three values for the two-parameter exponential dist. as follows:
qmtheta.hat
gives the estimate location parameter,
qmbeta.hat
gives the estimate scale parameter,
and qmlamda.hat
gives the estimate the rate.
Elgmati, E., Gregni, N. (2016). Quartile Method Estimation of Two-Parameter Exponential Distribution Data with Outliers. International Journal of Statistics and Probability, 5(5), 12-15. doi:10.5539/ijsp.v5n5p12
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set qm_tpexp(x1,"Q13") # or qm_tpexp(x1) qm_tpexp(x1,"Q12")
x1 <- c(25,43,53,65,76,86,95,115,132,150) # test a data set qm_tpexp(x1,"Q13") # or qm_tpexp(x1) qm_tpexp(x1,"Q12")
Survival function plot of the two-parameter exponential distribution with theta
and beta
surplot(x, theta, beta)
surplot(x, theta, beta)
x |
vector of quantile. |
theta |
location parameter, where |
beta |
scale parameter, where |
a survival function plot of the two-parameter exponential distribution
x <- seq(0,20,by=0.01) theta <- 8 beta <- 1 surplot(x,theta,beta)
x <- seq(0,20,by=0.01) theta <- 8 beta <- 1 surplot(x,theta,beta)
Density, distribution function, quantile function, and random generation function
for the two-parameter exponential distribution with theta
and beta
dtpexp(x, theta = 0, beta = 1, log = FALSE) ptpexp(q, theta = 0, beta = 1, lower.tail = TRUE, log.p = FALSE) qtpexp(p, theta = 0, beta = 1, lower.tail = TRUE, log.p = FALSE) rtpexp(n, theta = 0, beta = 1)
dtpexp(x, theta = 0, beta = 1, log = FALSE) ptpexp(q, theta = 0, beta = 1, lower.tail = TRUE, log.p = FALSE) qtpexp(p, theta = 0, beta = 1, lower.tail = TRUE, log.p = FALSE) rtpexp(n, theta = 0, beta = 1)
x , q
|
vector of quantile. |
theta |
location parameter, where |
beta |
scale parameter, where |
log , log.p
|
logical; (default = |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
number of observations. If |
dtpexp
gives the density,
ptpexp
gives the distribution function,
qtpexp
gives the quantile function,
and rtpexp
generates random samples.
x <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) dtpexp(x,theta=0,beta=1) dtpexp(x,theta=0,beta=1,log=TRUE) q <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) ptpexp(q,theta = 0, beta = 1) ptpexp(q,theta=0, beta = 1, lower.tail = FALSE) q <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) p<- ptpexp(q,theta = 0, beta = 1); p qtpexp(p,theta=0, beta = 1) rtpexp(5, theta=0, beta=1) rtpexp(10, theta=1, beta=1.5)
x <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) dtpexp(x,theta=0,beta=1) dtpexp(x,theta=0,beta=1,log=TRUE) q <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) ptpexp(q,theta = 0, beta = 1) ptpexp(q,theta=0, beta = 1, lower.tail = FALSE) q <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0) p<- ptpexp(q,theta = 0, beta = 1); p qtpexp(p,theta=0, beta = 1) rtpexp(5, theta=0, beta=1) rtpexp(10, theta=1, beta=1.5)