Package 'fitODBOD'

Title: Modeling Over Dispersed Binomial Outcome Data Using BMD and ABD
Description: Contains Probability Mass Functions, Cumulative Mass Functions, Negative Log Likelihood value, parameter estimation and modeling data using Binomial Mixture Distributions (BMD) (Manoj et al (2013) <doi:10.5539/ijsp.v2n2p24>) and Alternate Binomial Distributions (ABD) (Paul (1985) <doi:10.1080/03610928508828990>), also Journal article to use the package(<doi:10.21105/joss.01505>).
Authors: Amalan Mahendran [aut, cre] , Pushpakanthie Wijekoon [aut, ctb]
Maintainer: Amalan Mahendran <[email protected]>
License: MIT + file LICENSE
Version: 1.5.1
Built: 2024-05-11 07:56:58 UTC
Source: https://github.com/Amalan-ConStat/fitODBOD

Help Index


Alcohol data

Description

Lemmens , Knibbe and Tan(1988) described a study of self reported alcohol frequencies. The no of alcohol consumption data in two reference weeks is separately self reported by a randomly selected sample of 399 respondents in the Netherlands in 1983. Number of days a given individual consumes alcohol out of 7 days a week can be treated as a binomial variable. The collection of all such variables from all respondents would be defined as "Binomial Outcome Data".

Usage

Alcohol_data

Format

A data frame with 3 columns and 8 rows.

Days

No of Days Drunk

week1

Observed frequencies for week1

week2

Observed frequencies for week2

Source

Extracted from

Manoj, C., Wijekoon, P. & Yapa, R.D., 2013. The McDonald Generalized Beta-Binomial Distribution: A New Binomial Mixture Distribution and Simulation Based Comparison with Its Nested Distributions in Handling Overdispersion. International Journal of Statistics and Probability, 2(2), pp.24-41.

Available at: doi:10.5539/ijsp.v2n2p24

Examples

Alcohol_data$Days          # extracting the binomial random variables
sum(Alcohol_data$week2)       # summing all the frequencies in week2

Binomial Data Extraction from Raw data

Description

The below function has the ability to extract from the raw data to Binomial Outcome Data. This function simplifies the data into more presentable way to the user.

Usage

BODextract(data)

Arguments

data

vector of observations

Details

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further

Value

The output of BODextract gives a list format consisting

RV binomial random variables in vector form

Freq corresponding frequencies in vector form

Examples

datapoints <- sample(0:10,340,replace=TRUE) #creating a sample set of observations
BODextract(datapoints)                   #extracting binomial outcome data from observations
Random.variable <- BODextract(datapoints)$RV #extracting the binomial random variables

Chromosome Data

Description

Data in this example refer to 337 observations on the secondary association of chromosomes in Brassika; n , which is now the number of chromosomes, equals 3 and X is the number of pairs of bivalents showing association.

Usage

Chromosome_data

Format

A data frame with 2 columns and 4 rows

No.of.Asso

No of Associations

fre

Observed frequencies

Source

Extracted from

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990

Examples

Chromosome_data$No.of.Asso          #extracting the binomial random variables
sum(Chromosome_data$fre)            #summing all the frequencies

Course Data

Description

The data refer to the numbers of courses taken by a class of 65 students from the first year of the Department of Statistics of Athens University of Economics. The students enrolled in this class attended 8 courses during the first year of their study. The total numbers of successful examinations (including resits) were recorded.

Usage

Course_data

Format

A data frame with 2 columns and 9 rows

sub.pass

subjects passed

fre

Observed frequencies

Source

Extracted from

Karlis, D. & Xekalaki, E., 2008. The Polygonal Distribution. In Advances in Mathematical and Statistical Modeling. Boston: Birkhuser Boston, pp. 21-33.

Available at: doi:10.1007/978-0-8176-4626-4_2.

Examples

Course_data$sub.pass             # extracting the binomial random variables
sum(Course_data$fre)             # summing all the frequencies

Additive Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Additive Binomial Distribution.

Usage

dAddBin(x,n,p,alpha)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

p

single value for probability of success

alpha

single value for alpha parameter.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

PAddBin(x)=(nx)px(1p)nx(alpha2(x(x1)p+(nx)(nx1)(1p)alpha(n1)n2)+1)P_{AddBin}(x)= {n \choose x} p^x (1-p)^{n-x}(\frac{alpha}{2}(\frac{x(x-1)}{p}+\frac{(n-x)(n-x-1)}{(1-p)}-\frac{alpha(n-1)n}{2})+1)

The alpha is in between

2n(n1)min(p1p,1pp)alpha(n+(2p1)24p(1p))1\frac{-2}{n(n-1)}min(\frac{p}{1-p},\frac{1-p}{p}) \le alpha \le (\frac{n+(2p-1)^2}{4p(1-p)})^{-1}

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

0<p<10 < p < 1

1<alpha<1-1 < alpha < 1

The mean and the variance are denoted as

EAddbin[x]=npE_{Addbin}[x]=np

VarAddbin[x]=np(1p)(1+(n1)alpha)Var_{Addbin}[x]=np(1-p)(1+(n-1)alpha)

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dAddBin gives a list format consisting

pdf probability function values in vector form.

mean mean of Additive Binomial Distribution.

var variance of Additive Binomial Distribution.

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate discrete distributions (Vol. 444). Hoboken, NJ: Wiley-Interscience.

L. L. Kupper, J.K.H., 1978. The Use of a Correlated Binomial Model for the Analysis of Certain Toxicological Experiments. Biometrics, 34(1), pp.69-76.

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990

Jorge G. Morel and Nagaraj K. Neerchal. Overdispersion Models in SAS. SAS Institute, 2012.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Additive binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
  lines(0:10,dAddBin(0:10,10,a[i],b[i])$pdf,col = col[i],lwd=2.85)
  points(0:10,dAddBin(0:10,10,a[i],b[i])$pdf,col = col[i],pch=16)
}

dAddBin(0:10,10,0.58,0.022)$pdf     #extracting the probability values
dAddBin(0:10,10,0.58,0.022)$mean    #extracting the mean
dAddBin(0:10,10,0.58,0.022)$var     #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Additive binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pAddBin(0:10,10,a[i],b[i]),col = col[i],lwd=2.85)
points(0:10,pAddBin(0:10,10,a[i],b[i]),col = col[i],pch=16)
}

pAddBin(0:10,10,0.58,0.022)       #acquiring the cumulative probability values

Beta Distribution

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for the Beta Distribution bounded between [0,1]

Usage

dBETA(p,a,b)

Arguments

p

vector of probabilities.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

Details

The probability density function and cumulative density function of a unit bounded Beta distribution with random variable P are given by

gP(p)=pa1(1p)b1B(a,b)g_{P}(p)= \frac{p^{a-1}(1-p)^{b-1}}{B(a,b)}

; 0p10 \le p \le 1

GP(p)=Bp(a,b)B(a,b)G_{P}(p)= \frac{B_p(a,b)}{B(a,b)}

; 0p10 \le p \le 1

a,b>0a,b > 0

The mean and the variance are denoted by

E[P]=aa+bE[P]= \frac{a}{a+b}

var[P]=ab(a+b)2(a+b+1)var[P]= \frac{ab}{(a+b)^2(a+b+1)}

The moments about zero is denoted as

E[Pr]=i=0r1(a+ia+b+i)E[P^r]= \prod_{i=0}^{r-1} (\frac{a+i}{a+b+i})

r=1,2,3,...r = 1,2,3,...

Defined as Bp(a,b)=0pta1(1t)b1dtB_p(a,b)=\int^p_0 t^{a-1} (1-t)^{b-1}\,dt is incomplete beta integrals and B(a,b)B(a,b) is the beta function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dBETA gives a list format consisting

pdf probability density values in vector form.

mean mean of the Beta distribution.

var variance of the Beta distribution.

References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1994) Continuous Univariate Distributions, Vol. 2, Wiley Series in Probability and Mathematical Statistics, Wiley.

Trenkler, G., 1996. Continuous univariate distributions. Computational Statistics & Data Analysis, 21(1), p.119.

Available at: doi:10.1016/0167-9473(96)90015-8.

See Also

Beta

or

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Beta.html

Examples

#plotting the random variables and probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values",
xlim = c(0,1),ylim = c(0,4))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),dBETA(seq(0,1,by=0.01),a[i],a[i])$pdf,col = col[i])
}

dBETA(seq(0,1,by=0.01),2,3)$pdf   #extracting the pdf values
dBETA(seq(0,1,by=0.01),2,3)$mean  #extracting the mean
dBETA(seq(0,1,by=0.01),2,3)$var   #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative density graph",xlab="Random variable",ylab="Cumulative density values",
xlim = c(0,1),ylim = c(0,1))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),pBETA(seq(0,1,by=0.01),a[i],a[i]),col = col[i])
}

pBETA(seq(0,1,by=0.01),2,3)   #acquiring the cumulative probability values
mazBETA(1.4,3,2)              #acquiring the moment about zero values
mazBETA(2,3,2)-mazBETA(1,3,2)^2 #acquiring the variance for a=3,b=2

#only the integer value of moments is taken here because moments cannot be decimal
mazBETA(1.9,5.5,6)

Beta-Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Beta-Binomial Distribution.

Usage

dBetaBin(x,n,a,b)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

Details

Mixing Beta distribution with Binomial distribution will create the Beta-Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PBetaBin(x)=(nx)B(a+x,n+bx)B(a,b)P_{BetaBin}(x)= {n \choose x} \frac{B(a+x,n+b-x)}{B(a,b)}

a,b>0a,b > 0

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

The mean, variance and over dispersion are denoted as

EBetaBin[x]=naa+bE_{BetaBin}[x]= \frac{na}{a+b}

VarBetaBin[x]=(nab)(a+b)2(a+b+n)(a+b+1)Var_{BetaBin}[x]= \frac{(nab)}{(a+b)^2} \frac{(a+b+n)}{(a+b+1)}

overdispersion=1a+b+1over dispersion= \frac{1}{a+b+1}

Defined as B(a,b) is the beta function.

Value

The output of dBetaBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Beta-Binomial Distribution.

var variance of the Beta-Binomial Distribution.

over.dis.para over dispersion value of the Beta-Binomial Distribution.

References

Young-Xu, Y. & Chan, K.A., 2008. Pooling overdispersed binomial data to estimate event rate. BMC medical research methodology, 8(1), p.58.

Available at: doi:10.1186/1471-2288-8-58.

Trenkler, G., 1996. Continuous univariate distributions. Computational Statistics & Data Analysis, 21(1), p.119.

Available at: doi:10.1016/0167-9473(96)90015-8.

Hughes, G., 1993. Using the Beta-Binomial Distribution to Describe Aggregated Patterns of Disease Incidence. Phytopathology, 83(9), p.759.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,0.2)
plot(0,0,main="Beta-binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dBetaBin(0:10,10,a[i],a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dBetaBin(0:10,10,a[i],a[i])$pdf,col = col[i],pch=16)
}

dBetaBin(0:10,10,4,.2)$pdf    #extracting the pdf values
dBetaBin(0:10,10,4,.2)$mean   #extracting the mean
dBetaBin(0:10,10,4,.2)$var    #extracting the variance
dBetaBin(0:10,10,4,.2)$over.dis.para  #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:4)
{
lines(0:10,pBetaBin(0:10,10,a[i],a[i]),col = col[i])
points(0:10,pBetaBin(0:10,10,a[i],a[i]),col = col[i])
}

pBetaBin(0:10,10,4,.2)   #acquiring the cumulative probability values

Beta-Correlated Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Beta-Correlated Binomial Distribution.

Usage

dBetaCorrBin(x,n,cov,a,b)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

cov

single value for covariance.

a

single value for alpha parameter.

b

single value for beta parameter.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

Capture.png

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

0<a,b0 < a,b

<cov<+-\infty < cov < +\infty

0<p<10 < p < 1

p=aa+bp=\frac{a}{a+b}

Θ=1a+b\Theta=\frac{1}{a+b}

The Correlation is in between

2n(n1)min(p1p,1pp)correlation2p(1p)(n1)p(1p)+0.25fo\frac{-2}{n(n-1)} min(\frac{p}{1-p},\frac{1-p}{p}) \le correlation \le \frac{2p(1-p)}{(n-1)p(1-p)+0.25-fo}

where fo=min[(x(n1)p0.5)2]fo=min [(x-(n-1)p-0.5)^2]

The mean and the variance are denoted as

EBetaCorrBin[x]=npE_{BetaCorrBin}[x]= np

VarBetaCorrBin[x]=np(1p)(nΘ+1)(1+Θ)1+n(n1)covVar_{BetaCorrBin}[x]= np(1-p)(n\Theta+1)(1+\Theta)^{-1}+n(n-1)cov

CorrBetaCorrBin[x]=covp(1p)Corr_{BetaCorrBin}[x]=\frac{cov}{p(1-p)}

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dBetaCorrBin gives a list format consisting

pdf probability function values in vector form.

mean mean of Beta-Correlated Binomial Distribution.

var variance of Beta-Correlated Binomial Distribution.

corr correlation of Beta-Correlated Binomial Distribution.

mincorr minimum correlation value possible.

maxcorr maximum correlation value possible.

References

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990 .

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(9.0,10,11,12,13)
b <- c(8.0,8.1,8.2,8.3,8.4)
plot(0,0,main="Beta-Correlated binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dBetaCorrBin(0:10,10,0.001,a[i],b[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dBetaCorrBin(0:10,10,0.001,a[i],b[i])$pdf,col = col[i],pch=16)
}

dBetaCorrBin(0:10,10,0.001,10,13)$pdf      #extracting the pdf values
dBetaCorrBin(0:10,10,0.001,10,13)$mean     #extracting the mean
dBetaCorrBin(0:10,10,0.001,10,13)$var      #extracting the variance
dBetaCorrBin(0:10,10,0.001,10,13)$corr     #extracting the correlation
dBetaCorrBin(0:10,10,0.001,10,13)$mincorr  #extracting the minimum correlation value
dBetaCorrBin(0:10,10,0.001,10,13)$maxcorr  #extracting the maximum correlation value

#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(9.0,10,11,12,13)
b <- c(8.0,8.1,8.2,8.3,8.4)
plot(0,0,main="Beta-Correlated binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pBetaCorrBin(0:10,10,0.001,a[i],b[i]),col = col[i],lwd=2.85)
points(0:10,pBetaCorrBin(0:10,10,0.001,a[i],b[i]),col = col[i],pch=16)
}

pBetaCorrBin(0:10,10,0.001,10,13)      #acquiring the cumulative probability values

COM Poisson Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the COM Poisson Binomial Distribution.

Usage

dCOMPBin(x,n,p,v)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

p

single value for probability of success.

v

single value for v.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

PCOMPBin(x)=(nx)vpx(1p)nxj=0n(nj)vpj(1p)(nj)P_{COMPBin}(x) = \frac{{n \choose x}^v p^x (1-p)^{n-x}}{\sum_{j=0}^{n} {n \choose j}^v p^j (1-p)^{(n-j)}}

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

0<p<10 < p < 1

<v<+-\infty < v < +\infty

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dCOMPBin gives a list format consisting

pdf probability function values in vector form.

mean mean of COM Poisson Binomial Distribution.

var variance of COM Poisson Binomial Distribution.

References

Extracted from

Borges, P., Rodrigues, J., Balakrishnan, N. and Bazan, J., 2014. A COM-Poisson type generalization of the binomial distribution and its properties and applications. Statistics & Probability Letters, 87, pp.158-166.

Available at: doi:10.1016/j.spl.2014.01.019

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="COM Poisson Binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dCOMPBin(0:10,10,a[i],b[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dCOMPBin(0:10,10,a[i],b[i])$pdf,col = col[i],pch=16)
}

dCOMPBin(0:10,10,0.58,0.022)$pdf      #extracting the pdf values
dCOMPBin(0:10,10,0.58,0.022)$mean     #extracting the mean
dCOMPBin(0:10,10,0.58,0.022)$var      #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="COM Poisson Binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pCOMPBin(0:10,10,a[i],b[i]),col = col[i],lwd=2.85)
points(0:10,pCOMPBin(0:10,10,a[i],b[i]),col = col[i],pch=16)
}

pCOMPBin(0:10,10,0.58,0.022)      #acquiring the cumulative probability values

Correlated Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Correlated Binomial Distribution.

Usage

dCorrBin(x,n,p,cov)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

p

single value for probability of success.

cov

single value for covariance.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

PCorrBin(x)=(nx)(px)(1p)nx(1+(cov2p2(1p)2)((xnp)2+x(2p1)np2))P_{CorrBin}(x) = {n \choose x}(p^x)(1-p)^{n-x}(1+(\frac{cov}{2p^2(1-p)^2})((x-np)^2+x(2p-1)-np^2))

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

0<p<10 < p < 1

<cov<+-\infty < cov < +\infty

The Correlation is in between

2n(n1)min(p1p,1pp)correlation2p(1p)(n1)p(1p)+0.25fo\frac{-2}{n(n-1)} min(\frac{p}{1-p},\frac{1-p}{p}) \le correlation \le \frac{2p(1-p)}{(n-1)p(1-p)+0.25-fo}

where fo=min[(x(n1)p0.5)2]fo=min [(x-(n-1)p-0.5)^2]

The mean and the variance are denoted as

ECorrBin[x]=npE_{CorrBin}[x]= np

VarCorrBin[x]=n(p(1p)+(n1)cov)Var_{CorrBin}[x]= n(p(1-p)+(n-1)cov)

CorrCorrBin[x]=covp(1p)Corr_{CorrBin}[x]=\frac{cov}{p(1-p)}

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dCorrBin gives a list format consisting

pdf probability function values in vector form.

mean mean of Correlated Binomial Distribution.

var variance of Correlated Binomial Distribution.

corr correlation of Correlated Binomial Distribution.

mincorr minimum correlation value possible.

maxcorr maximum correlation value possible.

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate discrete distributions (Vol. 444). Hoboken, NJ: Wiley-Interscience.

L. L. Kupper, J.K.H., 1978. The Use of a Correlated Binomial Model for the Analysis of Certain Toxicological Experiments. Biometrics, 34(1), pp.69-76.

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990 .

Jorge G. Morel and Nagaraj K. Neerchal. Overdispersion Models in SAS. SAS Institute, 2012.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Correlated binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dCorrBin(0:10,10,a[i],b[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dCorrBin(0:10,10,a[i],b[i])$pdf,col = col[i],pch=16)
}

dCorrBin(0:10,10,0.58,0.022)$pdf      #extracting the pdf values
dCorrBin(0:10,10,0.58,0.022)$mean     #extracting the mean
dCorrBin(0:10,10,0.58,0.022)$var      #extracting the variance
dCorrBin(0:10,10,0.58,0.022)$corr     #extracting the correlation
dCorrBin(0:10,10,0.58,0.022)$mincorr  #extracting the minimum correlation value
dCorrBin(0:10,10,0.58,0.022)$maxcorr  #extracting the maximum correlation value

#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Correlated binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pCorrBin(0:10,10,a[i],b[i]),col = col[i],lwd=2.85)
points(0:10,pCorrBin(0:10,10,a[i],b[i]),col = col[i],pch=16)
}

pCorrBin(0:10,10,0.58,0.022)      #acquiring the cumulative probability values

Gamma Distribution

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for Gamma Distribution bounded between [0,1].

Usage

dGAMMA(p,c,l)

Arguments

p

vector of probabilities.

c

single value for shape parameter c.

l

single value for shape parameter l.

Details

The probability density function and cumulative density function of a unit bounded Gamma distribution with random variable P are given by

gP(p)=clpc1γ(l)[ln(1/p)]l1g_{P}(p) = \frac{ c^l p^{c-1}}{\gamma(l)} [ln(1/p)]^{l-1}

; 0p10 \le p \le 1

GP(p)=Ig(l,cln(1/p))γ(l)G_{P}(p) = \frac{ Ig(l,cln(1/p))}{\gamma(l)}

; 0p10 \le p \le 1

l,c>0l,c > 0

The mean the variance are denoted by

E[P]=(cc+1)lE[P] = (\frac{c}{c+1})^l

var[P]=(cc+2)l(cc+1)2lvar[P] = (\frac{c}{c+2})^l - (\frac{c}{c+1})^{2l}

The moments about zero is denoted as

E[Pr]=(cc+r)lE[P^r]=(\frac{c}{c+r})^l

r=1,2,3,...r = 1,2,3,...

Defined as γ(l)\gamma(l) is the gamma function Defined as Ig(l,cln(1/p))=0cln(1/p)tl1etdtIg(l,cln(1/p))= \int_0^{cln(1/p)} t^{l-1} e^{-t}dt is the Lower incomplete gamma function

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dGAMMA gives a list format consisting

pdf probability density values in vector form.

mean mean of the Gamma distribution.

var variance of Gamma distribution.

References

Olshen, A. C. Transformations of the Pearson Type III Distribution. Ann. Math. Statist. 9 (1938), no. 3, 176–200.

See Also

GammaDist

Examples

#plotting the random variables and probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values",
xlim = c(0,1),ylim = c(0,4))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),dGAMMA(seq(0,1,by=0.01),a[i],a[i])$pdf,col = col[i])
}

dGAMMA(seq(0,1,by=0.01),5,6)$pdf   #extracting the pdf values
dGAMMA(seq(0,1,by=0.01),5,6)$mean  #extracting the mean
dGAMMA(seq(0,1,by=0.01),5,6)$var   #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative density graph",xlab="Random variable",ylab="Cumulative density values",
xlim = c(0,1),ylim = c(0,1))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),pGAMMA(seq(0,1,by=0.01),a[i],a[i]),col = col[i])
}

pGAMMA(seq(0,1,by=0.01),5,6)   #acquiring the cumulative probability values
mazGAMMA(1.4,5,6)              #acquiring the moment about zero values
mazGAMMA(2,5,6)-mazGAMMA(1,5,6)^2 #acquiring the variance for a=5,b=6

#only the integer value of moments is taken here because moments cannot be decimal
mazGAMMA(1.9,5.5,6)

Gamma Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Gamma Binomial Distribution.

Usage

dGammaBin(x,n,c,l)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

c

single value for shape parameter c.

l

single value for shape parameter l.

Details

Mixing Gamma distribution with Binomial distribution will create the the Gamma Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PGammaBin[x]=(nx)j=0nx(nxj)(1)j(cc+x+j)lP_{GammaBin}[x]= {n \choose x} \sum_{j=0}^{n-x} {n-x \choose j} (-1)^j (\frac{c}{c+x+j})^l

c,l>0c,l > 0

x=0,1,2,...,nx = 0,1,2,...,n

n=1,2,3,...n = 1,2,3,...

The mean, variance and over dispersion are denoted as

EGammaBin[x]=(cc+1)lE_{GammaBin}[x] = (\frac{c}{c+1})^l

VarGammaBin[x]=n2[(cc+2)l(cc+1)2l]+n(cc+1)l1)(c+1c+2)lVar_{GammaBin}[x] = n^2[(\frac{c}{c+2})^l - (\frac{c}{c+1})^{2l}] + n(\frac{c}{c+1})^l{1-)(\frac{c+1}{c+2})^l}

overdispersion=(cc+2)l(cc+1)2l(cc+1)l[1(cc+1)l]over dispersion= \frac{(\frac{c}{c+2})^l - (\frac{c}{c+1})^{2l}}{(\frac{c}{c+1})^l[1-(\frac{c}{c+1})^l]}

Value

The output of dGammaBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Gamma Binomial Distribution.

var variance of the Gamma Binomial Distribution.

over.dis.para over dispersion value of the Gamma Binomial Distribution.

References

Grassia, A., 1977. On a family of distributions with argument between 0 and 1 obtained by transformation of the gamma and derived compound distributions. Australian Journal of Statistics, 19(2), pp.108-114.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,0.2)
plot(0,0,main="Gamma Binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dGammaBin(0:10,10,a[i],a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dGammaBin(0:10,10,a[i],a[i])$pdf,col = col[i],pch=16)
}

dGammaBin(0:10,10,4,.2)$pdf    #extracting the pdf values
dGammaBin(0:10,10,4,.2)$mean   #extracting the mean
dGammaBin(0:10,10,4,.2)$var    #extracting the variance
dGammaBin(0:10,10,4,.2)$over.dis.para  #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:4)
{
lines(0:10,pGammaBin(0:10,10,a[i],a[i]),col = col[i])
points(0:10,pGammaBin(0:10,10,a[i],a[i]),col = col[i])
}

pGammaBin(0:10,10,4,.2)   #acquiring the cumulative probability values

Generalized Beta Type-1 Distribution

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for the Generalized Beta Type-1 Distribution bounded between [0,1].

Usage

dGBeta1(p,a,b,c)

Arguments

p

vector of probabilities.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

c

single value for shape parameter gamma representing as c.

Details

The probability density function and cumulative density function of a unit bounded Generalized Beta Type-1 Distribution with random variable P are given by

gP(p)=cB(a,b)pac1(1pc)b1g_{P}(p)= \frac{c}{B(a,b)} p^{ac-1} (1-p^c)^{b-1}

; 0p10 \le p \le 1

GP(p)=pacaB(a,b)2F1(a,1b;pc;a+1)G_{P}(p)= \frac{p^{ac}}{aB(a,b)} 2F1(a,1-b;p^c;a+1)

0p10 \le p \le 1

a,b,c>0a,b,c > 0

The mean and the variance are denoted by

E[P]=B(a+b,1c)B(a,1c)E[P]= \frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})}

var[P]=B(a+b,2c)B(a,2c)(B(a+b,1c)B(a,1c))2var[P]= \frac{B(a+b,\frac{2}{c})}{B(a,\frac{2}{c})}-(\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})})^2

The moments about zero is denoted as

E[Pr]=B(a+b,rc)B(a,rc)E[P^r]= \frac{B(a+b,\frac{r}{c})}{B(a,\frac{r}{c})}

r=1,2,3,....r = 1,2,3,....

Defined as B(a,b)B(a,b) is Beta function. Defined as 2F1(a,b;c;d)2F1(a,b;c;d) is Gaussian Hypergeometric function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dGBeta1 gives a list format consisting

pdf probability density values in vector form.

mean mean of the Generalized Beta Type-1 Distribution.

var variance of the Generalized Beta Type-1 Distribution.

References

Manoj, C., Wijekoon, P. & Yapa, R.D., 2013. The McDonald Generalized Beta-Binomial Distribution: A New Binomial Mixture Distribution and Simulation Based Comparison with Its Nested Distributions in Handling Overdispersion. International Journal of Statistics and Probability, 2(2), pp.24-41.

Available at: doi:10.5539/ijsp.v2n2p24 .

Janiffer, N.M., Islam, A. & Luke, O., 2014. Estimating Equations for Estimation of Mcdonald Generalized Beta - Binomial Parameters. , (October), pp.702-709.

Roozegar, R., Tahmasebi, S. & Jafari, A.A., 2015. The McDonald Gompertz Distribution: Properties and Applications. Communications in Statistics - Simulation and Computation, (May), pp.0-0.

Available at: doi:10.5539/ijsp.v2n2p24.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(.1,.2,.3,1.5,2.15)
plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values",
xlim = c(0,1),ylim = c(0,10))
for (i in 1:5)
{
lines(seq(0,1,by=0.001),dGBeta1(seq(0,1,by=0.001),a[i],1,2*a[i])$pdf,col = col[i])
}

dGBeta1(seq(0,1,by=0.01),2,3,1)$pdf    #extracting the pdf values
dGBeta1(seq(0,1,by=0.01),2,3,1)$mean   #extracting the mean
dGBeta1(seq(0,1,by=0.01),2,3,1)$var    #extracting the variance

pGBeta1(0.04,2,3,4)        #acquiring the cdf values for a=2,b=3,c=4
mazGBeta1(1.4,3,2,2)              #acquiring the moment about zero values
mazGBeta1(2,3,2,2)-mazGBeta1(1,3,2,2)^2        #acquiring the variance for a=3,b=2,c=2

#only the integer value of moments is taken here because moments cannot be decimal
mazGBeta1(3.2,3,2,2)

Gaussian Hypergeometric Generalized Beta Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Gaussian Hypergeometric Generalized Beta Binomial distribution.

Usage

dGHGBB(x,n,a,b,c)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

a

single value for shape parameter alpha value representing a.

b

single value for shape parameter beta value representing b.

c

single value for shape parameter lambda value representing c.

Details

Mixing Gaussian Hypergeometric Generalized Beta distribution with Binomial distribution will create the Gaussian Hypergeometric Generalized Beta Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PGHGBB(x)=12F1(n,a;bn+1;c)(nx)B(x+a,nx+b)B(a,b+n)(cx)P_{GHGBB}(x)=\frac{1}{2F1(-n,a;-b-n+1;c)} {n \choose x} \frac{B(x+a,n-x+b)}{B(a,b+n)}(c^x)

a,b,c>0a,b,c > 0

x=0,1,2,...nx = 0,1,2,...n

n=1,2,3,...n = 1,2,3,...

The mean, variance and over dispersion are denoted as

EGHGBB[x]=nEGHGBetaE_{GHGBB}[x]= nE_{GHGBeta}

VarGHGBB[x]=nEGHGBeta(1EGHGBeta)+n(n1)VarGHGBetaVar_{GHGBB}[x]= nE_{GHGBeta}(1-E_{GHGBeta})+ n(n-1)Var_{GHGBeta}

overdispersion=varGHGBetaEGHGBeta(1EGHGBeta)over dispersion= \frac{var_{GHGBeta}}{E_{GHGBeta}(1-E_{GHGBeta})}

Defined as B(a,b)B(a,b) is the beta function. Defined as 2F1(a,b;c;d)2F1(a,b;c;d) is the Gaussian Hypergeometric function

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dGHGBB gives a list format consisting

pdf probability function values in vector form.

mean mean of Gaussian Hypergeometric Generalized Beta Binomial Distribution.

var variance of Gaussian Hypergeometric Generalized Beta Binomial Distribution.

over.dis.para over dispersion value of Gaussian Hypergeometric Generalized Beta Binomial Distribution.

References

Rodriguez-Avi, J., Conde-Sanchez, A., Saez-Castillo, A. J., & Olmo-Jimenez, M. J. (2007). A generalization of the beta-binomial distribution. Journal of the Royal Statistical Society. Series C (Applied Statistics), 56(1), 51-61.

Pearson, J., 2009. Computation of Hypergeometric Functions. Transformation, (September), p.1–123.

See Also

hypergeo_powerseries

Examples

#plotting the random variables and probability values
col <- rainbow(6)
a <- c(.1,.2,.3,1.5,2.1,3)
plot(0,0,main="GHGBB probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,7),ylim = c(0,0.9))
for (i in 1:6)
{
lines(0:7,dGHGBB(0:7,7,1+a[i],0.3,1+a[i])$pdf,col = col[i],lwd=2.85)
points(0:7,dGHGBB(0:7,7,1+a[i],0.3,1+a[i])$pdf,col = col[i],pch=16)
}

dGHGBB(0:7,7,1.3,0.3,1.3)$pdf      #extracting the pdf values
dGHGBB(0:7,7,1.3,0.3,1.3)$mean     #extracting the mean
dGHGBB(0:7,7,1.3,0.3,1.3)$var      #extracting the variance
dGHGBB(0:7,7,1.3,0.3,1.3)$over.dis.par  #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,7),ylim = c(0,1))
for (i in 1:4)
{
lines(0:7,pGHGBB(0:7,7,1+a[i],0.3,1+a[i]),col = col[i])
points(0:7,pGHGBB(0:7,7,1+a[i],0.3,1+a[i]),col = col[i])
}

pGHGBB(0:7,7,1.3,0.3,1.3)     #acquiring the cumulative probability values

Gaussian Hypergeometric Generalized Beta Distribution

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for the Gaussian Hypergeometric Generalized Beta distribution bounded between [0,1].

Usage

dGHGBeta(p,n,a,b,c)

Arguments

p

vector of probabilities.

n

single value for no of binomial trials.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

c

single value for shape parameter lambda representing as c.

Details

The probability density function and cumulative density function of a unit bounded Gaussian Hypergeometric Generalized Beta Distribution with random variable P are given by

gP(p)=1B(a,b)2F1(n,a;bn+1;1)2F1(n,a;bn+1;c)pa1(1p)b1cb+n(c+(1c)p)a+b+ng_{P}(p)= \frac{1}{B(a,b)}\frac{2F1(-n,a;-b-n+1;1)}{2F1(-n,a;-b-n+1;c)} p^{a-1}(1-p)^{b-1} \frac{c^{b+n}}{(c+(1-c)p)^{a+b+n}}

; 0p10 \le p \le 1

GP(p)=0p1B(a,b)2F1(n,a;bn+1;1)2F1(n,a;bn+1;c)ta1(1t)b1cb+n(c+(1c)t)a+b+ndtG_{P}(p)= \int^p_0 \frac{1}{B(a,b)}\frac{2F1(-n,a;-b-n+1;1)}{2F1(-n,a;-b-n+1;c)} t^{a-1}(1-t)^{b-1}\frac{c^{b+n}}{(c+(1-c)t)^{a+b+n}} \,dt

; 0p10 \le p \le 1

a,b,c>0a,b,c > 0

n=1,2,3,...n = 1,2,3,...

The mean and the variance are denoted by

E[P]=01pB(a,b)2F1(n,a;bn+1;1)2F1(n,a;bn+1;c)pa1(1p)b1cb+n(c+(1c)p)a+b+ndpE[P]= \int^1_0 \frac{p}{B(a,b)}\frac{2F1(-n,a;-b-n+1;1)}{2F1(-n,a;-b-n+1;c)} p^{a-1}(1-p)^{b-1}\frac{c^{b+n}}{(c+(1-c)p)^{a+b+n}} \,dp

var[P]=01p2B(a,b)2F1(n,a;bn+1;1)2F1(n,a;bn+1;c)pa1(1p)b1cb+n(c+(1c)p)a+b+ndp(E[p])2var[P]= \int^1_0 \frac{p^2}{B(a,b)}\frac{2F1(-n,a;-b-n+1;1)}{2F1(-n,a;-b-n+1;c)} p^{a-1}(1-p)^{b-1}\frac{c^{b+n}}{(c+(1-c)p)^{a+b+n}} \,dp - (E[p])^2

The moments about zero is denoted as

E[Pr]=01prB(a,b)2F1(n,a;bn+1;1)2F1(n,a;bn+1;c)pa1(1p)b1cb+n(c+(1c)p)a+b+ndpE[P^r]= \int^1_0 \frac{p^r}{B(a,b)}\frac{2F1(-n,a;-b-n+1;1)}{2F1(-n,a;-b-n+1;c)} p^{a-1}(1-p)^{b-1}\frac{c^{b+n}}{(c+(1-c)p)^{a+b+n}} \,dp

r=1,2,3,...r = 1,2,3,...

Defined as B(a,b)B(a,b) as the beta function. Defined as 2F1(a,b;c;d)2F1(a,b;c;d) as the Gaussian Hypergeometric function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dGHGBeta gives a list format consisting

pdf probability density values in vector form.

mean mean of the Gaussian Hypergeometric Generalized Beta Distribution.

var variance of the Gaussian Hypergeometric Generalized Beta Distribution.

References

Rodriguez-Avi, J., Conde-Sanchez, A., Saez-Castillo, A. J., & Olmo-Jimenez, M. J. (2007). A generalization of the beta-binomial distribution. Journal of the Royal Statistical Society. Series C (Applied Statistics), 56(1), 51-61.

Pearson, J., 2009. Computation of Hypergeometric Functions. Transformation, (September), p.1–123.

See Also

hypergeo_powerseries

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(.1,.2,.3,1.5,2.15)
plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values",
xlim = c(0,1),ylim = c(0,10))
for (i in 1:5)
{
lines(seq(0,1,by=0.001),dGHGBeta(seq(0,1,by=0.001),7,1+a[i],0.3,1+a[i])$pdf,col = col[i])
}

dGHGBeta(seq(0,1,by=0.01),7,1.6312,0.3913,0.6659)$pdf   #extracting the pdf values
dGHGBeta(seq(0,1,by=0.01),7,1.6312,0.3913,0.6659)$mean  #extracting the mean
dGHGBeta(seq(0,1,by=0.01),7,1.6312,0.3913,0.6659)$var   #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(6)
a <- c(.1,.2,.3,1.5,2.1,3)
plot(0,0,main="Cumulative density graph",xlab="Random variable",ylab="Cumulative density values",
xlim = c(0,1),ylim = c(0,1))
for (i in 1:6)
{
lines(seq(0.01,1,by=0.001),pGHGBeta(seq(0.01,1,by=0.001),7,1+a[i],0.3,1+a[i]),col=col[i])
}

pGHGBeta(seq(0,1,by=0.01),7,1.6312,0.3913,0.6659) #acquiring the cumulative probability values
mazGHGBeta(1.4,7,1.6312,0.3913,0.6659)            #acquiring the moment about zero values

#acquiring the variance for a=1.6312,b=0.3913,c=0.6659
mazGHGBeta(2,7,1.6312,0.3913,0.6659)-mazGHGBeta(1,7,1.6312,0.3913,0.6659)^2

#only the integer value of moments is taken here because moments cannot be decimal
mazGHGBeta(1.9,15,5,6,1)

Grassia-II-Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Grassia-II-Binomial Distribution.

Usage

dGrassiaIIBin(x,n,a,b)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

a

single value for shape parameter a.

b

single value for shape parameter b.

Details

Mixing Gamma distribution with Binomial distribution will create the the Grassia-II-Binomial distribution, only when (1-p)=e^(-lambda) of the Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PGrassiaIIBin[x]=(nx)j=0x(xj)(1)xj(1+b(nj))aP_{GrassiaIIBin}[x]= {n \choose x} \sum_{j=0}^{x} {x \choose j} (-1)^{x-j} (1+b(n-j))^{-a}

a,b>0a,b > 0

x=0,1,2,...,nx = 0,1,2,...,n

n=1,2,3,...n = 1,2,3,...

The mean, variance and over dispersion are denoted as

EGrassiaIIBin[x]=(bb+1)aE_{GrassiaIIBin}[x] = (\frac{b}{b+1})^a

VarGrassiaIIBin[x]=n2[(bb+2)a(bb+1)2a]+n(bb+1)a1(b+1b+2)aVar_{GrassiaIIBin}[x] = n^2[(\frac{b}{b+2})^a - (\frac{b}{b+1})^{2a}] + n(\frac{b}{b+1})^a{1-(\frac{b+1}{b+2})^a}

overdispersion=(bb+2)l(bb+1)2a(bb+1)a[1(bb+1)a]over dispersion= \frac{(\frac{b}{b+2})^l - (\frac{b}{b+1})^{2a}}{(\frac{b}{b+1})^a[1-(\frac{b}{b+1})^a]}

Value

The output of dGrassiaIIBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Grassia II Binomial Distribution.

var variance of the Grassia II Binomial Distribution.

over.dis.para over dispersion value of the Grassia II Binomial Distribution.

References

Grassia, A., 1977. On a family of distributions with argument between 0 and 1 obtained by transformation of the gamma and derived compound distributions. Australian Journal of Statistics, 19(2), pp.108-114.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,0.2)
plot(0,0,main="Grassia II binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dGrassiaIIBin(0:10,10,a[i],a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dGrassiaIIBin(0:10,10,a[i],a[i])$pdf,col = col[i],pch=16)
}

dGrassiaIIBin(0:10,10,4,.2)$pdf    #extracting the pdf values
dGrassiaIIBin(0:10,10,4,.2)$mean   #extracting the mean
dGrassiaIIBin(0:10,10,4,.2)$var    #extracting the variance
dGrassiaIIBin(0:10,10,4,.2)$over.dis.para  #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <-c (1,2,5,10)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:4)
{
lines(0:10,pGrassiaIIBin(0:10,10,a[i],a[i]),col = col[i])
points(0:10,pGrassiaIIBin(0:10,10,a[i],a[i]),col = col[i])
}

pGrassiaIIBin(0:10,10,4,.2)   #acquiring the cumulative probability values

Kumaraswamy Distribution

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for the Kumaraswamy Distribution bounded between [0,1].

Usage

dKUM(p,a,b)

Arguments

p

vector of probabilities.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

Details

The probability density function and cumulative density function of a unit bounded Kumaraswamy Distribution with random variable P are given by

gP(p)=abpa1(1pa)b1g_{P}(p)= abp^{a-1}(1-p^a)^{b-1}

; 0p10 \le p \le 1

GP(p)=1(1pa)bG_{P}(p)= 1-(1-p^a)^b

; 0p10 \le p \le 1

a,b>0a,b > 0

The mean and the variance are denoted by

E[P]=bB(1+1a,b)E[P]= bB(1+\frac{1}{a},b)

var[P]=bB(1+2a,b)(bB(1+1a,b))2var[P]= bB(1+\frac{2}{a},b)-(bB(1+\frac{1}{a},b))^2

The moments about zero is denoted as

E[Pr]=bB(1+ra,b)E[P^r]= bB(1+\frac{r}{a},b)

r=1,2,3,...r = 1,2,3,...

Defined as B(a,b)B(a,b) is the beta function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dKUM gives a list format consisting

pdf probability density values in vector form.

mean mean of the Kumaraswamy distribution.

var variance of the Kumaraswamy distribution.

References

Kumaraswamy, P. (1980). A generalized probability density function for double-bounded random processes. Journal of Hydrology, 46(1), 79-88.

Available at : doi:10.1016/0022-1694(80)90036-0.

Jones, M. C. (2009). Kumaraswamy's distribution: A beta-type distribution with some tractability advantages. Statistical Methodology, 6(1), 70-81.

Available at : doi:10.1016/j.stamet.2008.04.001.

See Also

Kumaraswamy

Examples

#plotting the random variables and probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values",
xlim = c(0,1),ylim = c(0,6))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),dKUM(seq(0,1,by=0.01),a[i],a[i])$pdf,col = col[i])
}

dKUM(seq(0,1,by=0.01),2,3)$pdf   #extracting the probability values
dKUM(seq(0,1,by=0.01),2,3)$mean  #extracting the mean
dKUM(seq(0,1,by=0.01),2,3)$var   #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative density graph",xlab="Random variable",ylab="Cumulative density values",
xlim = c(0,1),ylim = c(0,1))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),pKUM(seq(0,1,by=0.01),a[i],a[i]),col = col[i])
}

pKUM(seq(0,1,by=0.01),2,3)    #acquiring the cumulative probability values

mazKUM(1.4,3,2)               #acquiring the moment about zero values
mazKUM(2,2,3)-mazKUM(1,2,3)^2  #acquiring the variance for a=2,b=3

#only the integer value of moments is taken here because moments cannot be decimal
mazKUM(1.9,5.5,6)

Kumaraswamy Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Kumaraswamy Binomial Distribution.

Usage

dKumBin(x,n,a,b,it=25000)

Arguments

x

vector of binomial random variables

n

single value for no of binomial trial

a

single value for shape parameter alpha representing a

b

single value for shape parameter beta representing b

it

number of iterations to converge as a proper probability function replacing infinity

Details

Mixing Kumaraswamy distribution with Binomial distribution will create the Kumaraswamy Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PKumBin(x)=ab(nx)j=0it(1)j(b1j)B(x+a+aj,nx+1)P_{KumBin}(x)= ab{n \choose x} \sum_{j=0}^{it} (-1)^j{b-1 \choose j}B(x+a+aj,n-x+1)

a,b>0a,b > 0

x=0,1,2,...nx = 0,1,2,...n

n=1,2,3,...n = 1,2,3,...

it>0it > 0

The mean, variance and over dispersion are denoted as

EKumBin[x]=nbB(1+1a,b)E_{KumBin}[x]= nbB(1+\frac{1}{a},b)

VarKumBin[x]=n2b(B(1+2a,b)bB(1+1a,b)2)+nb(B(1+1a,b)B(1+2a,b))Var_{KumBin}[x]= n^2 b(B(1+\frac{2}{a},b)-bB(1+\frac{1}{a},b)^2)+ nb(B(1+\frac{1}{a},b)-B(1+\frac{2}{a},b))

overdispersion=(bB(1+2a,b)(bB(1+1a,b))2)(bB(1+1a,b)(bB(1+1a,b))2)over dispersion= \frac{(bB(1+\frac{2}{a},b)-(bB(1+\frac{1}{a},b))^2)} {(bB(1+\frac{1}{a},b)-(bB(1+\frac{1}{a},b))^2)}

Defined as B(a,b)B(a,b) is the beta function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dKumBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Kumaraswamy Binomial Distribution.

var variance of the Kumaraswamy Binomial Distribution.

over.dis.para over dispersion value of the Kumaraswamy Distribution.

References

Li, X. H., Huang, Y. Y., & Zhao, X. Y. (2011). The Kumaraswamy Binomial Distribution. Chinese Journal of Applied Probability and Statistics, 27(5), 511-521.

Examples

## Not run: 
#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,.85)
plot(0,0,main="Kumaraswamy binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5) {
lines(0:10,dKumBin(0:10,10,a[i],a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dKumBin(0:10,10,a[i],a[i])$pdf,col = col[i],pch=16)
  }

## End(Not run)

dKumBin(0:10,10,4,2)$pdf  #extracting the pdf values
dKumBin(0:10,10,4,2)$mean #extracting the mean
dKumBin(0:10,10,4,2)$var  #extracting the variance
dKumBin(0:10,10,4,2)$over.dis.para #extracting the over dispersion value

## Not run: 
#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(1,2,5,10,.85)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5) {
lines(0:10,pKumBin(0:10,10,a[i],a[i]),col = col[i])
points(0:10,pKumBin(0:10,10,a[i],a[i]),col = col[i])
  }

## End(Not run)

pKumBin(0:10,10,4,2)    #acquiring the cumulative probability values

Lovinson Multiplicative Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Lovinson Multiplicative Binomial Distribution.

Usage

dLMBin(x,n,p,phi)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

p

single value for probability of success.

phi

single value for phi.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

PLMBin(x)=(nx)px(1p)nx(phix(nx)f(p,phi,n)P_{LMBin}(x)= {n \choose x} p^x (1-p)^{n-x} \frac{(phi^{x(n-x)}}{f(p,phi,n)}

here f(p,phi,n)f(p,phi,n) is

f(p,phi,n)=k=0n(nk)pk(1p)nk(phik(nk))f(p,phi,n)= \sum_{k=0}^{n} {n \choose k} p^k (1-p)^{n-k} (phi^{k(n-k)} )

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

k=0,1,2,...,nk = 0,1,2,...,n

0<p<10 < p < 1

0<phi0 < phi

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dLMBin gives a list format consisting

pdf probability function values in vector form.

mean mean of Lovinson Multiplicative Binomial Distribution.

var variance of Lovinson Multiplicative Binomial Distribution.

References

Elamir, E.A., 2013. Multiplicative-Binomial Distribution: Some Results on Characterization, Inference and Random Data Generation. Journal of Statistical Theory and Applications, 12(1), pp.92-105.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Lovinson Multiplicative binomial probability
     function graph",xlab="Binomial random variable",
     ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dLMBin(0:10,10,a[i],1+b[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dLMBin(0:10,10,a[i],1+b[i])$pdf,col = col[i],pch=16)
}

dLMBin(0:10,10,.58,10.022)$pdf   #extracting the pdf values
dLMBin(0:10,10,.58,10.022)$mean   #extracting the mean
dLMBin(0:10,10,.58,10.022)$var   #extracting the variance


#plotting random variables and cumulative probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Lovinson Multiplicative binomial probability
     function graph",xlab="Binomial random variable",
     ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pLMBin(0:10,10,a[i],1+b[i]),col = col[i],lwd=2.85)
points(0:10,pLMBin(0:10,10,a[i],1+b[i]),col = col[i],pch=16)
}

pLMBin(0:10,10,.58,10.022)     #acquiring the cumulative probability values

McDonald Generalized Beta Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the McDonald Generalized Beta Binomial Distribution.

Usage

dMcGBB(x,n,a,b,c)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

c

single value for shape parameter gamma representing as c.

Details

Mixing Generalized Beta Type-1 Distribution with Binomial distribution the probability function value and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PMcGBB(x)=(nx)1B(a,b)(j=0nx(1)j(nxj)B(xc+a+jc,b))P_{McGBB}(x)= {n \choose x} \frac{1}{B(a,b)} (\sum_{j=0}^{n-x} (-1)^j {n-x \choose j} B(\frac{x}{c}+a+\frac{j}{c},b) )

a,b,c>0a,b,c > 0

The mean, variance and over dispersion are denoted as

EMcGBB[x]=nB(a+b,1c)B(a,1c)E_{McGBB}[x]= n\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})}

VarMcGBB[x]=n2(B(a+b,2c)B(a,2c)(B(a+b,1c)B(a,1c))2)+n(B(a+b,1c)B(a,1c)B(a+b,2c)B(a,2c))Var_{McGBB}[x]= n^2(\frac{B(a+b,\frac{2}{c})}{B(a,\frac{2}{c})}-(\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})})^2) +n(\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})}-\frac{B(a+b,\frac{2}{c})}{B(a,\frac{2}{c})})

overdispersion=B(a+b,2c)B(a,2c)(B(a+b,1c)B(a,1c))2B(a+b,1c)B(a,1c)(B(a+b,1c)B(a,1c))2over dispersion= \frac{\frac{B(a+b,\frac{2}{c})}{B(a,\frac{2}{c})}-(\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})})^2}{\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})}-(\frac{B(a+b,\frac{1}{c})}{B(a,\frac{1}{c})})^2}

x=0,1,2,...nx = 0,1,2,...n

n=1,2,3,...n = 1,2,3,...

Value

The output of dMcGBB gives a list format consisting

pdf probability function values in vector form.

mean mean of McDonald Generalized Beta Binomial Distribution.

var variance of McDonald Generalized Beta Binomial Distribution.

over.dis.para over dispersion value of McDonald Generalized Beta Binomial Distribution.

References

Manoj, C., Wijekoon, P. & Yapa, R.D., 2013. The McDonald Generalized Beta-Binomial Distribution: A New Binomial Mixture Distribution and Simulation Based Comparison with Its Nested Distributions in Handling Overdispersion. International Journal of Statistics and Probability, 2(2), pp.24-41.

Available at: doi:10.5539/ijsp.v2n2p24.

Janiffer, N.M., Islam, A. & Luke, O., 2014. Estimating Equations for Estimation of Mcdonald Generalized Beta - Binomial Parameters. , (October), pp.702-709.

Roozegar, R., Tahmasebi, S. & Jafari, A.A., 2015. The McDonald Gompertz Distribution: Properties and Applications. Communications in Statistics - Simulation and Computation, (May), pp.0-0.

Available at: doi:10.1080/03610918.2015.1088024.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,0.6)
plot(0,0,main="Mcdonald generalized beta-binomial probability function graph",
xlab="Binomial random variable",ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dMcGBB(0:10,10,a[i],2.5,a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dMcGBB(0:10,10,a[i],2.5,a[i])$pdf,col = col[i],pch=16)
}

dMcGBB(0:10,10,4,2,1)$pdf             #extracting the pdf values
dMcGBB(0:10,10,4,2,1)$mean            #extracting the mean
dMcGBB(0:10,10,4,2,1)$var             #extracting the variance
dMcGBB(0:10,10,4,2,1)$over.dis.para   #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(4)
a <- c(1,2,5,10)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:4)
{
lines(0:10,pMcGBB(0:10,10,a[i],a[i],2),col = col[i])
points(0:10,pMcGBB(0:10,10,a[i],a[i],2),col = col[i])
}

pMcGBB(0:10,10,4,2,1)       #acquiring the cumulative probability values

Multiplicative Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Multiplicative Binomial Distribution.

Usage

dMultiBin(x,n,p,theta)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

p

single value for probability of success.

theta

single value for theta.

Details

The probability function and cumulative function can be constructed and are denoted below

The cumulative probability function is the summation of probability function values.

PMultiBin(x)=(nx)px(1p)nx(thetax(nx)f(p,theta,n)P_{MultiBin}(x)= {n \choose x} p^x (1-p)^{n-x} \frac{(theta^{x(n-x)}}{f(p,theta,n)}

here f(p,theta,n)f(p,theta,n) is

f(p,theta,n)=k=0n(nk)pk(1p)nk(thetak(nk))f(p,theta,n)= \sum_{k=0}^{n} {n \choose k} p^k (1-p)^{n-k} (theta^{k(n-k)} )

x=0,1,2,3,...nx = 0,1,2,3,...n

n=1,2,3,...n = 1,2,3,...

k=0,1,2,...,nk = 0,1,2,...,n

0<p<10 < p < 1

0<theta0 < theta

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dMultiBin gives a list format consisting

pdf probability function values in vector form.

mean mean of Multiplicative Binomial Distribution.

var variance of Multiplicative Binomial Distribution.

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate discrete distributions (Vol. 444). Hoboken, NJ: Wiley-Interscience.

L. L. Kupper, J.K.H., 1978. The Use of a Correlated Binomial Model for the Analysis of Certain Toxicological Experiments. Biometrics, 34(1), pp.69-76.

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990.

Examples

#plotting the random variables and probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Multiplicative binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5)
{
lines(0:10,dMultiBin(0:10,10,a[i],1+b[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dMultiBin(0:10,10,a[i],1+b[i])$pdf,col = col[i],pch=16)
}

dMultiBin(0:10,10,.58,10.022)$pdf   #extracting the pdf values
dMultiBin(0:10,10,.58,10.022)$mean   #extracting the mean
dMultiBin(0:10,10,.58,10.022)$var   #extracting the variance


#plotting random variables and cumulative probability values
col <- rainbow(5)
a <- c(0.58,0.59,0.6,0.61,0.62)
b <- c(0.022,0.023,0.024,0.025,0.026)
plot(0,0,main="Multiplicative binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5)
{
lines(0:10,pMultiBin(0:10,10,a[i],1+b[i]),col = col[i],lwd=2.85)
points(0:10,pMultiBin(0:10,10,a[i],1+b[i]),col = col[i],pch=16)
}

pMultiBin(0:10,10,.58,10.022)     #acquiring the cumulative probability values

Triangular Distribution Bounded Between [0,1]

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moments about zero values for the Triangular Distribution bounded between [0,1].

Usage

dTRI(p,mode)

Arguments

p

vector of probabilities.

mode

single value for mode.

Details

Setting min=0min=0 and max=1max=1 mode=cmode=c in the Triangular distribution a unit bounded Triangular distribution can be obtained. The probability density function and cumulative density function of a unit bounded Triangular distribution with random variable P are given by

gP(p)=2pcg_{P}(p)= \frac{2p}{c}

; 0p<c0 \le p < c

gP(p)=2(1p)(1c)g_{P}(p)= \frac{2(1-p)}{(1-c)}

; cp1c \le p \le 1

GP(p)=p2cG_{P}(p)= \frac{p^2}{c}

; 0p<c0 \le p < c

GP(p)=1(1p)2(1c)G_{P}(p)= 1-\frac{(1-p)^2}{(1-c)}

; cp1c \le p \le 1

0mode=c10 \le mode=c \le 1

The mean and the variance are denoted by

E[P]=(a+b+c)3=(1+c)3E[P]= \frac{(a+b+c)}{3}= \frac{(1+c)}{3}

var[P]=a2+b2+c2abacbc18=(1+c2c)18var[P]= \frac{a^2+b^2+c^2-ab-ac-bc}{18}= \frac{(1+c^2-c)}{18}

Moments about zero is denoted as

E[Pr]=2cr+2c(r+2)+2(1cr+1)(1c)(r+1)+2(cr+21)(1c)(r+2)E[P^r]= \frac{2c^{r+2}}{c(r+2)}+\frac{2(1-c^{r+1})}{(1-c)(r+1)}+\frac{2(c^{r+2}-1)}{(1-c)(r+2)}

r=1,2,3,...r = 1,2,3,...

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dTRI gives a list format consisting

pdf probability density values in vector form.

mean mean of the unit bounded Triangular distribution.

variance variance of the unit bounded Triangular distribution

References

Horsnell, G. (1957). Economic acceptance sampling schemes. Journal of the Royal Statistical Society, Series A, 120:148-191.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1994) Continuous Univariate Distributions, Vol. 2, Wiley Series in Probability and Mathematical Statistics, Wiley.

Karlis, D. & Xekalaki, E., 2008. The Polygonal Distribution. In Advances in Mathematical and Statistical Modeling. Boston: Birkhuser Boston, pp. 21-33.

Available at: doi:10.1007/978-0-8176-4626-4_2 .

Okagbue, H. et al., 2014. Using the Average of the Extreme Values of a Triangular Distribution for a Transformation, and Its Approximant via the Continuous Uniform Distribution. British Journal of Mathematics & Computer Science, 4(24), pp.3497-3507.

Available at: doi:10.9734/BJMCS/2014/12299 .

Examples

#plotting the random variables and probability values
col <- rainbow(4)
x <- seq(0.2,0.8,by=0.2)
plot(0,0,main="Probability density graph",xlab="Random variable",
ylab="Probability density values",xlim = c(0,1),ylim = c(0,3))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),dTRI(seq(0,1,by=0.01),x[i])$pdf,col = col[i])
}

dTRI(seq(0,1,by=0.05),0.3)$pdf     #extracting the pdf values
dTRI(seq(0,1,by=0.01),0.3)$mean    #extracting the mean
dTRI(seq(0,1,by=0.01),0.3)$var     #extracting the variance

#plotting the random variables and cumulative probability values
col <- rainbow(4)
x <- seq(0.2,0.8,by=0.2)
plot(0,0,main="Cumulative density graph",xlab="Random variable",
ylab="Cumulative density values",xlim = c(0,1),ylim = c(0,1))
for (i in 1:4)
{
lines(seq(0,1,by=0.01),pTRI(seq(0,1,by=0.01),x[i]),col = col[i])
}

pTRI(seq(0,1,by=0.05),0.3)      #acquiring the cumulative probability values
mazTRI(1.4,.3)                  #acquiring the moment about zero values
mazTRI(2,.3)-mazTRI(1,.3)^2     #variance for when is mode 0.3

#only the integer value of moments is taken here because moments cannot be decimal
mazTRI(1.9,0.5)

Triangular Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Triangular Binomial distribution.

Usage

dTriBin(x,n,mode)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

mode

single value for mode.

Details

Mixing unit bounded Triangular distribution with Binomial distribution will create Triangular Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values.

PTriBin(x)=2(nx)(c1Bc(x+2,nx+1)+(1c)1B(x+1,nx+2)(1c)1Bc(x+1,nx+2))P_{TriBin}(x)= 2 {n \choose x}(c^{-1}B_c(x+2,n-x+1)+(1-c)^{-1}B(x+1,n-x+2)-(1-c)^{-1}B_c(x+1,n-x+2))

0<mode=c<10 < mode=c < 1

x=0,1,2,...nx = 0,1,2,...n

n=1,2,3...n = 1,2,3...

The mean, variance and over dispersion are denoted as

ETriiBin[x]=n(1+c)3E_{TriiBin}[x]= \frac{n(1+c)}{3}

VarTriBin[x]=n(n+3)18n(n3)c(1c)18Var_{TriBin}[x]= \frac{n(n+3)}{18}-\frac{n(n-3)c(1-c)}{18}

overdispersion=(1c+c2)2(2+cc2)over dispersion= \frac{(1-c+c^2)}{2(2+c-c^2)}

Defined as Bc(a,b)=0cta1(1t)b1dtB_c(a,b)=\int^c_0 t^{a-1} (1-t)^{b-1} \,dt is incomplete beta integrals and B(a,b)B(a,b) is the beta function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dTriBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Triangular Binomial Distribution.

var variance of the Triangular Binomial Distribution.

over.dis.para over dispersion value of the Triangular Binomial Distribution.

References

Horsnell, G. (1957). Economic acceptance sampling schemes. Journal of the Royal Statistical Society, Series A, 120:148-191.

Karlis, D. & Xekalaki, E., 2008. The Polygonal Distribution. In Advances in Mathematical and Statistical Modeling. Boston: Birkhuser Boston, pp. 21-33.

Available at: doi:10.1007/978-0-8176-4626-4_2 .

Okagbue, H. et al., 2014. Using the Average of the Extreme Values of a Triangular Distribution for a Transformation, and Its Approximant via the Continuous Uniform Distribution. British Journal of Mathematics & Computer Science, 4(24), pp.3497-3507.

Available at: doi:10.9734/BJMCS/2014/12299.

Examples

#plotting the random variables and probability values
col <- rainbow(7)
x <- seq(0.1,0.7,by=0.1)
plot(0,0,main="Triangular binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,.3))
for (i in 1:7)
{
lines(0:10,dTriBin(0:10,10,x[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dTriBin(0:10,10,x[i])$pdf,col = col[i],pch=16)
}

dTriBin(0:10,10,.4)$pdf        #extracting the pdf values
dTriBin(0:10,10,.4)$mean       #extracting the mean
dTriBin(0:10,10,.4)$var        #extracting the variance
dTriBin(0:10,10,.4)$over.dis.para  #extracting the over dispersion value

#plotting the random variables and cumulative probability values
col <- rainbow(7)
x <- seq(0.1,0.7,by=0.1)
plot(0,0,main="Triangular binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:7)
{
lines(0:10,pTriBin(0:10,10,x[i]),col = col[i],lwd=2.85)
points(0:10,pTriBin(0:10,10,x[i]),col = col[i],pch=16)
}

pTriBin(0:10,10,.4)    #acquiring the cumulative probability values

Uniform Distribution Bounded Between [0,1]

Description

These functions provide the ability for generating probability density values, cumulative probability density values and moments about zero values for the Uniform Distribution bounded between [0,1].

Usage

dUNI(p)

Arguments

p

vector of probabilities.

Details

Setting a=0a=0 and b=1b=1 in the Uniform Distribution a unit bounded Uniform Distribution can be obtained. The probability density function and cumulative density function of a unit bounded Uniform Distribution with random variable P are given by

gP(p)=1g_{P}(p) = 1

0p10 \le p \le 1

GP(p)=pG_{P}(p) = p

0p10 \le p \le 1

The mean and the variance are denoted as

E[P]=1a+b=0.5E[P]= \frac{1}{a+b}= 0.5

var[P]=(ba)212=0.0833var[P]= \frac{(b-a)^2}{12}= 0.0833

Moments about zero is denoted as

E[Pr]=erberar(ba)=er1rE[P^r]= \frac{e^{rb}-e^{ra}}{r(b-a)}= \frac{e^r-1}{r}

r=1,2,3,...r = 1,2,3,...

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dUNI gives a list format consisting

pdf probability density values in vector form.

mean mean of unit bounded uniform distribution.

var variance of unit bounded uniform distribution.

References

Horsnell, G. (1957). Economic acceptance sampling schemes. Journal of the Royal Statistical Society, Series A, 120:148-191.

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1994) Continuous Univariate Distributions, Vol. 2, Wiley Series in Probability and Mathematical Statistics, Wiley.

See Also

Uniform

or

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Uniform.html

Examples

#plotting the random variables and probability values
plot(seq(0,1,by=0.01),dUNI(seq(0,1,by=0.01))$pdf,type = "l",main="Probability density graph",
xlab="Random variable",ylab="Probability density values")

dUNI(seq(0,1,by=0.05))$pdf     #extract the pdf values
dUNI(seq(0,1,by=0.01))$mean    #extract the mean
dUNI(seq(0,1,by=0.01))$var     #extract the variance

#plotting the random variables and cumulative probability values
plot(seq(0,1,by=0.01),pUNI(seq(0,1,by=0.01)),type = "l",main="Cumulative density graph",
xlab="Random variable",ylab="Cumulative density values")

pUNI(seq(0,1,by=0.05))     #acquiring the cumulative probability values

mazUNI(c(1,2,3))    #acquiring the moment about zero values

#only the integer value of moments is taken here because moments cannot be decimal
mazUNI(1.9)

Uniform Binomial Distribution

Description

These functions provide the ability for generating probability function values and cumulative probability function values for the Uniform Binomial Distribution.

Usage

dUniBin(x,n)

Arguments

x

vector of binomial random variables.

n

single value for no of binomial trials.

Details

Mixing unit bounded uniform distribution with binomial distribution will create the Uniform Binomial Distribution. The probability function and cumulative probability function can be constructed and are denoted below.

The cumulative probability function is the summation of probability function values

PUniBin(x)=1n+1P_{UniBin}(x)= \frac{1}{n+1}

n=1,2,...n = 1,2,...

x=0,1,2,...nx = 0,1,2,...n

The mean, variance and over dispersion are denoted as

EUniBin[X]=n2E_{UniBin}[X]= \frac{n}{2}

VarUniBin[X]=n(n+2)12Var_{UniBin}[X]= \frac{n(n+2)}{12}

overdispersion=13over dispersion= \frac{1}{3}

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of dUniBin gives a list format consisting

pdf probability function values in vector form.

mean mean of the Uniform Binomial Distribution.

var variance of the Uniform Binomial Distribution.

ove.dis.para over dispersion value of Uniform Binomial Distribution.

References

Horsnell, G. (1957). Economic acceptance sampling schemes. Journal of the Royal Statistical Society, Series A, 120:148-191.

Okagbue, H. et al., 2014. Using the Average of the Extreme Values of a Triangular Distribution for a Transformation, and Its Approximant via the Continuous Uniform Distribution. British Journal of Mathematics & Computer Science, 4(24), pp.3497-3507.

Available at: doi:10.9734/BJMCS/2014/12299 .

Examples

#plotting the binomial random variables and probability values
plot(0:10,dUniBin(0:10,10)$pdf,type="l",main="Uniform binomial probability function graph",
xlab=" Binomial random variable",ylab="Probability function values")
points(0:10,dUniBin(0:10,10)$pdf)

dUniBin(0:300,300)$pdf  #extracting the pdf values
dUniBin(0:10,10)$mean   #extracting the mean
dUniBin(0:10,10)$var    #extracting the variance
dUniBin(0:10,10)$over.dis.para  #extracting the over dispersion

#plotting the binomial random variables and cumulative probability values
plot(0:10,pUniBin(0:10,10),type="l",main="Cumulative probability function graph",
xlab=" Binomial random variable",ylab="Cumulative probability function values")
points(0:10,pUniBin(0:10,10))

pUniBin(0:15,15)       #acquiring the cumulative probability values

Family Epidemics

Description

In this investigation, families of the same size, two parents and three children, living in different circumstances of domestic overcrowding were visited at fortnightly intervals. The date of onset and the clinical nature of upper respiratory infectious experienced by each member of the family were charted on a time scale marked off in days. Family epidemics of acute coryza-or common colds-were thus available for analysis.

Usage

Epidemic_Cold

Format

A data frame with 6 columns and 5 rows

Cases

No of Further Cases

Families

No of Families

Father

Father with Status of Introducing Cases

Mother

Mother with Status of Introducing Cases

SChild

School Child with Status of Introducing Cases

PSChild

Pre-School Child with Status of Introducing Cases

Details

By inspection of the epidemic time charts, it was possible to identify new or primary introductions of illness into the household by the onset of a cold after a lapse of 10 days since the last such case in the same home. Two such cases occurring on the same or succeeding days were classified as multiple primaries. Thereafter, the links in the epidemic chain of spread were defined by an interval of one day or more between successive cases in the same family. These family epidemics could then be described thus 1-2-1, 1-1-1-0, 2-1-0, etc. It must be emphasized that although this method of classification is somewhat arbitrary, it was completed before the corresponding theoretical distributions were worked out and the interval chosen agrees with the distribution of presumptive incubation periods of the common cold seen in field surveys (e.g. Badger, Dingle, Feller, Hodges, Jordan, and Rammelkamp, 1953).

Source

Extracted from

Heasman, M. A. and Reid, D. D. (1961). "Theory and observation in family epidemics of the common cold." Br. J. pleu. SOC. Med., 15, 12-16.

Examples

Epidemic_Cold$Cases
sum(Epidemic_Cold$SChild)

Estimating the shape parameters a and b for Beta-Binomial Distribution

Description

The functions will estimate the shape parameters using the maximum log likelihood method and moment generating function method for the Beta-Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMGFBetaBin(x,freq)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

Details

a,b>0a,b > 0

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of EstMGFBetaBin will produce the class mgf format consisting

a shape parameter of beta distribution representing for alpha

b shape parameter of beta distribution representing for beta

min Negative loglikelihood value

AIC AIC value

call the inputs for the function

Methods print, summary, coef and AIC can be used to extract specific outputs.

References

Young-Xu, Y. & Chan, K.A., 2008. Pooling overdispersed binomial data to estimate event rate. BMC medical research methodology, 8(1), p.58.

Available at: doi:10.1186/1471-2288-8-58.

Trenkler, G., 1996. Continuous univariate distributions. Computational Statistics & Data Analysis, 21(1), p.119.

Available at: doi:10.1016/0167-9473(96)90015-8.

Hughes, G., 1993. Using the Beta-Binomial Distribution to Describe Aggregated Patterns of Disease Incidence. Phytopathology, 83(9), p.759.

Available at: doi:10.1094/PHYTO-83-759

See Also

mle2

Examples

No.D.D <- 0:7        #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)   #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
estimate <- EstMLEBetaBin(No.D.D,Obs.fre.1,a=0.1,b=0.1)

bbmle::coef(estimate)   #extracting the parameters

#estimating the parameters using moment generating function methods
results <- EstMGFBetaBin(No.D.D,Obs.fre.1)

# extract the estimated parameters and summary
coef(results)
summary(results)

AIC(results) #show the AIC value

Estimating the probability of success and alpha for Additive Binomial Distribution

Description

The function will estimate the probability of success and alpha using the maximum log likelihood method for the Additive Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLEAddBin(x,freq)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

Details

freq0freq \ge 0

x=0,1,2,..x = 0,1,2,..

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

The output of EstMLEAddBin will produce the class mlAB and ml with a list consisting

min Negative Log Likelihood value.

p estimated probability of success.

alpha estimated alpha parameter.

AIC AIC value.

call the inputs for the function.

Methods print, summary, coef and AIC can be used to extract specific outputs.

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate discrete distributions (Vol. 444). Hoboken, NJ: Wiley-Interscience.

L. L. Kupper, J.K.H., 1978. The Use of a Correlated Binomial Model for the Analysis of Certain Toxicological Experiments. Biometrics, 34(1), pp.69-76.

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990

Jorge G. Morel and Nagaraj K. Neerchal. Overdispersion Models in SAS. SAS Institute, 2012.

Examples

No.D.D <- 0:7         #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)     #assigning the corresponding frequencies

## Not run: 
#estimating the probability value and alpha value
results <- EstMLEAddBin(No.D.D,Obs.fre.1)

#printing the summary of results
summary(results)

#extracting the estimated parameters
coef(results)

## End(Not run)

Estimating the shape parameters a and b for Beta-Binomial Distribution

Description

The functions will estimate the shape parameters using the maximum log likelihood method and moment generating function method for the Beta-Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLEBetaBin(x,freq,a,b,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

a

single value for shape parameter alpha representing as a.

b

single value for shape parameter beta representing as b.

...

mle2 function inputs except data and estimating parameter.

Details

a,b>0a,b > 0

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

EstMLEBetaBin here is used as a wrapper for the mle2 function of bbmle package therefore output is of class of mle2.

References

Young-Xu, Y. & Chan, K.A., 2008. Pooling overdispersed binomial data to estimate event rate. BMC medical research methodology, 8(1), p.58.

Available at: doi:10.1186/1471-2288-8-58.

Trenkler, G., 1996. Continuous univariate distributions. Computational Statistics & Data Analysis, 21(1), p.119.

Available at: doi:10.1016/0167-9473(96)90015-8.

Hughes, G., 1993. Using the Beta-Binomial Distribution to Describe Aggregated Patterns of Disease Incidence. Phytopathology, 83(9), p.759.

Available at: doi:10.1094/PHYTO-83-759

See Also

mle2

Examples

No.D.D <- 0:7        #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)   #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
estimate <- EstMLEBetaBin(No.D.D,Obs.fre.1,a=0.1,b=0.1)

bbmle::coef(estimate)   #extracting the parameters

#estimating the parameters using moment generating function methods
EstMGFBetaBin(No.D.D,Obs.fre.1)

Estimating the covariance, alpha and beta parameter values for Beta-Correlated Binomial Distribution

Description

The function will estimate the covariance, alpha and beta parameter values using the maximum log likelihood method for the Beta-Correlated Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLEBetaCorrBin(x,freq,cov,a,b,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

cov

single value for covariance.

a

single value for alpha parameter.

b

single value for beta parameter.

...

mle2 function inputs except data and estimating parameter.

Details

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

<cov<+-\infty < cov < +\infty

0<a,b0 < a,b

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

EstMLEBetaCorrBin here is used as a wrapper for the mle2 function of bbmle package therefore output is of class of mle2.

References

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990 .

See Also

mle2

Examples

No.D.D <- 0:7               #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)     #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
parameters <- EstMLEBetaCorrBin(x=No.D.D,freq=Obs.fre.1,cov=0.0050,a=10,b=10)

bbmle::coef(parameters)           #extracting the parameters

Estimating the probability of success and v parameter for COM Poisson Binomial Distribution

Description

The function will estimate the probability of success and v parameter using the maximum log likelihood method for the COM Poisson Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLECOMPBin(x,freq,p,v,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

p

single value for probability of success.

v

single value for v.

...

mle2 function inputs except data and estimating parameter.

Details

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

0<p<10 < p < 1

<v<+-\infty < v < +\infty

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

EstMLECOMPBin here is used as a wrapper for the mle2 function of bbmle package therefore output is of class of mle2.

References

Borges, P., Rodrigues, J., Balakrishnan, N. and Bazan, J., 2014. A COM-Poisson type generalization of the binomial distribution and its properties and applications. Statistics & Probability Letters, 87, pp.158-166.

Available at: doi:10.1016/j.spl.2014.01.019

Examples

No.D.D <- 0:7               #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)     #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
parameters <- EstMLECOMPBin(x=No.D.D,freq=Obs.fre.1,p=0.5,v=0.1)

bbmle::coef(parameters)           #extracting the parameters

Estimating the probability of success and correlation for Correlated Binomial Distribution

Description

The function will estimate the probability of success and correlation using the maximum log likelihood method for the Correlated Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLECorrBin(x,freq,p,cov,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

p

single value for probability of success.

cov

single value for covariance.

...

mle2 function inputs except data and estimating parameter.

Details

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

0<p<10 < p < 1

<cov<+-\infty < cov < +\infty

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

EstMLECorrBin here is used as a wrapper for the mle2 function of bbmle package therefore output is of class of mle2.

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate discrete distributions (Vol. 444). Hoboken, NJ: Wiley-Interscience.

L. L. Kupper, J.K.H., 1978. The Use of a Correlated Binomial Model for the Analysis of Certain Toxicological Experiments. Biometrics, 34(1), pp.69-76.

Paul, S.R., 1985. A three-parameter generalization of the binomial distribution. Communications in Statistics - Theory and Methods, 14(6), pp.1497-1506.

Available at: doi:10.1080/03610928508828990 .

Jorge G. Morel and Nagaraj K. Neerchal. Overdispersion Models in SAS. SAS Institute, 2012.

See Also

mle2

Examples

No.D.D <- 0:7               #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)     #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
parameters <- EstMLECorrBin(x=No.D.D,freq=Obs.fre.1,p=0.5,cov=0.0050)

bbmle::coef(parameters)           #extracting the parameters

Estimating the shape parameters c and l for Gamma Binomial distribution

Description

The function will estimate the shape parameters using the maximum log likelihood method for the Gamma Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLEGammaBin(x,freq,c,l,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

c

single value for shape parameter c.

l

single value for shape parameter l.

...

mle2 function inputs except data and estimating parameter.

Details

0<c,l0 < c,l

x=0,1,2,...x = 0,1,2,...

freq0freq \ge 0

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.

Value

EstMLEGammaBin here is used as a wrapper for the mle2 function of bbmle package therefore output is of class of mle2.

References

Grassia, A., 1977. On a family of distributions with argument between 0 and 1 obtained by transformation of the gamma and derived compound distributions. Australian Journal of Statistics, 19(2), pp.108-114.

Examples

No.D.D <- 0:7                   #assigning the random variables
Obs.fre.1 <- c(47,54,43,40,40,41,39,95)  #assigning the corresponding frequencies

#estimating the parameters using maximum log likelihood value and assigning it
parameters <- EstMLEGammaBin(x=No.D.D,freq=Obs.fre.1,c=0.1,l=0.1)

bbmle::coef(parameters)         #extracting the parameters

Estimating the shape parameters a,b and c for Gaussian Hypergeometric Generalized Beta Binomial Distribution

Description

The function will estimate the shape parameters using the maximum log likelihood method for the Gaussian Hypergeometric Generalized Beta Binomial distribution when the binomial random variables and corresponding frequencies are given.

Usage

EstMLEGHGBB(x,freq,a,b,c,...)

Arguments

x

vector of binomial random variables.

freq

vector of frequencies.

a

single value for shape parameter alpha representing a.

b

single value for shape parameter beta representing b.

c

single value for shape parameter lambda representing c.

...

mle2 function inputs except data and estimating parameter.

Details

0<a,b,c0 < a,b,c

x=0,1,2,...x = 0,1,2,...