Description Usage Arguments Value Author(s) References Examples
The functions dMX()
and pMX()
can be used to evaluated the
pdf (p function) and the cdf (p function) receptively from a gamlss.family mixture.
The functions getpdfMX()
and getpdfNP()
can be used to evaluate the fitted d
function at a specified observation and therefore for plotting the fitted distribution of a fitted model at this observation.
1 2 3 4 5 6 7 8 9 10 | 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, ...)
getpdfMX(object = NULL, observation = 1)
getpdfNP(object = NULL, observation = 1)
|
y,q |
vector of quantiles |
mu |
a vector of |
sigma |
a vector of |
nu |
a vector of |
tau |
a vector of |
pi |
a vector of |
family |
a vector of GAMLSS |
log |
whether the |
object |
a fitted |
observation |
the observation number in which we want to plot the fitted mixture |
... |
for extra arguments |
Returns values or pdf or cdf.
Mikis Stasinopoulos
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.
(see also https://www.gamlss.com/).
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")
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.