Pareto mix {extremefit} | R Documentation |
Pareto mixture distribution
Description
Density, distribution function, quantile function and random generation for the Pareto mixture distribution with equal to the shape of the first Pareto Distribution,
equal to the shape of the second Pareto Distribution and
is the mixture proportion. The locations and the scales parameters are equals to
and
.
Usage
pparetomix(q, a = 1, b = 2, c = 0.75)
dparetomix(x, a = 1, b = 2, c = 0.75)
qparetomix(p, a = 1, b = 2, c = 0.75, precision = 10^(-10),
initvalue = 0.5, Nmax = 1000)
rparetomix(n, a = 1, b = 2, c = 0.75, precision = 10^(-10))
Arguments
q |
a vector of quantiles. |
a |
the shape parameter of the first Pareto Distribution. |
b |
the shape parameter of the second Pareto Distribution. |
c |
the value of the mixture proportion. |
x |
a vector of quantiles. |
p |
a vector of probabilities. |
precision |
the precision of the Newton method. |
initvalue |
the initial value of the Newton method. |
Nmax |
the maximum of iteration done for the Newton method. |
n |
the number of observations. If length(n) > 1, the length is taken to be the number required. |
Details
If the ,
and
are not specified, they respectively take the default values
,
and
.
The cumulative Pareto mixture distribution is
where and
are the shapes of the distribution and
is the mixture proportion.
Value
dparetomix gives the density, pparetomix gives the distribution function, qparetomix gives the quantile function, and rparetomix generates random deviates.
The length of the result is determined by n for rparetomix, and is the maximum of the lengths of the numerical arguments for the other functions.
The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Examples
par(mfrow = c(3,1))
plot(function(x) dparetomix(x), 0, 5,ylab="density",
main = " Pareto mixture density ")
mtext("dparetomix(x)", adj = 0)
plot(function(x) pparetomix(x), 0, 5,ylab="distribution function",
main = " Pareto mixture Cumulative ")
mtext("pparetomix(x)", adj = 0)
plot(function(x) qparetomix(x), 0, 1,ylim=c(0,5),ylab="quantiles",
main = " Pareto mixture Quantile ")
mtext("qparetomix(x)", adj = 0)
#generate a sample of the Pareto mix distribution of size n
n <- 100
x <- rparetomix(n)