Description Usage Arguments Value Author(s) Examples
Returns a quantile function to the specifications of a user specified multisection composite distribution
1 |
xx |
Desired quantiles between 0 and 1 |
dists |
A vector of strings stating the desired partial distributions in order |
par |
A list of parameters, a vector of parameters for each partial distribution, with the first two being the interval limits and the second argument being he weights to be used |
borders |
Optional: If the distribution has to have continuous and differentiable catentation points, the user specifies a list for each of area following the first, containing a range for a parameter of the following partial distribution to lie within. |
par.pos |
Optional: If 'borders' is non empty, e.g a smooth function is desired, here the vector of parameter positions that need to be changed is specified. Default value is 1, meaning the first parameter for each partial distribution is amended |
buffer |
Optional: A two dimensional vector, containing the values for upper and lower buffer from the respective catenation points during optimization |
An object of the same length as xx
, giving the quantile values
Martin Wiegand, Saralees Nadarajah
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | par<-list()
distvec<-c("lnorm","gamma")
par[[1]]<-c(0,1,Inf)
par[[2]]<-c(1)
par[[3]]<-c(0,1)
par[[4]]<-c(1,1)
x<-seq(0.01,0.99,0.01)
# non-continuous case
y1<-qcomp(x,distvec,par)
# continuous case
y2<-qcomp(x,distvec,par,borders=list(c(0.00001,10)),buffer=c(10e-5,0))
par(mfrow=c(1,2),oma=rep(0,4))
xrange<-range(x)
yrange<-range(y1,y2)
plot(x,y1,type="l",xlab="x",ylab="Quantile function",xlim=xrange,ylim=yrange)
abline(h=1,lty=2)
plot(x,y2,type="l",xlab="x",ylab="Quantile function",xlim=xrange,ylim=yrange)
abline(h=1,lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.