R: The GAMLSS add on package for mixture distributions
gamlss.mx-package
R Documentation
The GAMLSS add on package for mixture distributions
Description
The main purpose of this package is to allow the user of the GAMLSS models to fit mixture distributions.
Details
Package:
gamlss.mx
Type:
Package
Version:
0.0
Date:
2005-08-3
License:
GPL (version 2 or later)
This package has two main function the gamlssMX() which is loosely based on the
package flexmix of R and the function gamlssNP() which is based on the npmlreg
package of Jochen Einbeck, Ross Darnell and John Hinde (2006) which in turns
is based on several GLIM4 macros originally written by Murray Aitkin and Brian
Francis. It also contains the function
gqz() which is written by Nick Sofroniou and the function gauss.quad()
written by Gordon Smyth.
Jochen Einbeck, Ross Darnell and John Hinde (2006) npmlreg: Nonparametric maximum likelihood estimation for random effect
models, R package version 0.34
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.
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2003) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).
See Also
gamlss,gamlss.family
Examples
data(enzyme)
mmNO <- gamlssMX(enzyme$act~1, family=NO, K=2)
mmNO
## Not run:
# also to make sure that it reaches the maximum
mmNOs <- gamlssMXfits(n=10,enzyme$act~1, family=NO, K=2)
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") )
hist(enzyme$act,freq=FALSE,ylim=c(0,3.5),xlim=c(0,3),br=21)
lines(seq(0,3,.01),fyNO, col="red")
# equivalent model using gamlssNP
mmNP <- gamlssNP(act~1, data=enzyme, random=~1,sigma.fo=~MASS,family=NO, K=2)
## End(Not run)