dMX: Evaluate the d (pdf) and p (cdf) functions from GAMLSS...

Description Usage Arguments Value Author(s) Examples

Description

The functions dMX and pMX can be used to evalaluate the pdf (p function) and the cdf (p function) repectively from a gamlss.family mixture.

Usage

1
2
3
4
5
6
7
8
dMX(y, mu = list(mu1 = 1, mu2 = 5), sigma = list(sigma1 = 1, sigma2 = 1), 
       nu = list(nu1 = 1, nu2 = 1), tau = list(tau1 = 1, tau2 = 1), 
       pi = list(pi1 = 0.2, pi2 = 0.8), family = list(fam1 = "NO", fam2 = "NO"), 
       log = FALSE, ...)
pMX(q, mu = list(mu1 = 1, mu2 = 5), sigma = list(sigma1 = 1, sigma2 = 1), 
       nu = list(nu1 = 1, nu2 = 1), tau = list(tau1 = 1, tau2 = 1), 
       pi = list(pi1 = 0.2, pi2 = 0.8), family = list(fam1 = "NO", fam2 = "NO"), 
       log = FALSE, ...)

Arguments

y,q

vector of quantiles

mu

a vector of mu's

sigma

a vector of sigma's

nu

a vector of nu's

tau

a vector of tau's

pi

a vector of pi's

family

a vector of GAMLSS family's

log

whether the log of the function or not

...

for extra arguments

Value

Returns values or pdf or cdf.

Author(s)

Mikis Stasinopoulos

Examples

1
2
3
4
5
6
fyNO<-dMX(y=seq(0,3,.01), mu=list(1.253, 0.1876), sigma=list(exp(-0.6665 ), exp(-2.573 )),
                  pi=list(0.4079609, 0.5920391 ), family=list("NO","NO") )
plot(fyNO~seq(0,3,.01), type="l")                  
FyNO<-pMX(q=seq(0,3,.01), mu=list(1.253, 0.1876), sigma=list(exp(-0.6665 ), exp(-2.573 )),
                  pi=list(0.4079609, 0.5920391 ), family=list("NO","NO") )
plot(FyNO~seq(0,3,.01), type="l")  

Example output

Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: gamlss
Loading required package: splines
Loading required package: gamlss.data
Loading required package: nlme
Loading required package: parallel
 **********   GAMLSS Version 5.0-2  ********** 
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.

Loading required package: nnet

gamlss.mx documentation built on May 2, 2019, 5:56 p.m.

Related to dMX in gamlss.mx...