Density, distribution function, quantile function and random generation for univariate mixture distributions, composed of exponential, normal and gamma distributions.

dunimix(x, obj, full.out, ...)

punimix(q, obj, full.out, ...)

runimix(n, obj, ...)

# S4 method for numeric,list
dunimix(x, obj, full.out, ...)

# S4 method for numeric,mxObj
dunimix(x, obj, full.out = FALSE, ...)

# S4 method for numeric,list
punimix(q, obj, full.out = FALSE, ...)

# S4 method for numeric,mxObj
punimix(q, obj, full.out, ...)

# S4 method for numeric,list
runimix(n, obj, ...)

# S4 method for numeric,mxObj
runimix(n, obj, ...)

Arguments

x

vector of quantiles

obj

obkect of class mxObj with mixture distribution parameters

full.out

return total density only or a matrix with all components

...

reserved for future extensions

q

vector of quantiles

n

number of random values

Value

dunimix gives the density, punimix gives the distribution function, qunimix gives the quantile function, and runimix generates random deviates. The length of the result is determined by the legnt of x. Argument full.out determines whether only a vector with the totals of the distribution or a data frame with all components is returned.

Note

A quantile function qunimix is not yet implemented. Automatic coercion of arguments may still have bugs.

Examples