| fitDist {gamlss} | R Documentation |
gamlss.family distributions to data
This function is using the function gamlssML() to fit all relevant parametric gamlss.family distributions to a data vector. The final model is the one which is selected by the generalised Akaike information criterion with penalty k.
fitDist(y, k = 2,
type = c("realAll", "realline", "realplus", "real0to1", "counts", "binom"),
try.gamlss = FALSE, extra = NULL, data = NULL, ...)
y |
the data vector |
k |
the penalty for the GAIC with default values |
type |
the type of distribution to be tried see details |
try.gamlss |
if |
extra |
whether extra distribution should be tried which are not in the |
data |
the data frame where |
... |
for extra arguments to be passed to gamlssML() to gamlss() |
The following are the different type argument:
realAll all the gamlss.family continuous distributions defined on the real line, i.e. realline plus realplus
reallinethe gamlss.family continuous distributions : "GU", "RG" ,"LO", "NET", "TF", "PE", "SN1", "SN2", "SHASH", "EGB2", "JSU", "SEP1", "SEP2", "SEP3", "SEP4","ST1", "ST2", "ST3", "ST4", "ST5", "GT"
realplus the gamlss.family continuous distributions in the positive leal line: "EXP","GA","IG","LNO", "WEI3", "BCCGo", "exGAUS", "GG", "GIG", "BCTo", "BCPEo"
real0to1the gamlss.family continuous distributions from 0 to 1: "BE", "BEINF", "BEINF0", "BEINF1", "BEOI", "BEZI", "GB1"
countsthe gamlss.family distributions for counts: "PO", "LG", "NBI", "NBII", "PIG", "DEL", "SI", "ZIP", "ZAP", "ZALG", "ZANBI", "ZIP2", "ZIPIG"
binomthe gamlss.family distributions for binomial type data :"BI", "BB", "ZIBI", "ZIBB", "ZABI", "ZABB"
A gamlssML object with two extra components:
fits |
an ordered list according to the GAIC of the fitted distribution |
failed |
the distributions where the |
Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk, Bob Rigby r.rigby@londonmet.ac.uk, Vlasis Voudouris v.voiudouris@londonmet.ac.uk and Majid Djennad m.djennad.londonmet.ac.uk
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. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).
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, http://www.jstatsoft.org/v23/i07.
y <- rt(100, df=1)
m1<-fitDist(y, type="realline")
m1$fits
m1$failed
# an example of using extra
## Not run:
library(gamlss.tr)
data(tensile)
gen.trun(par=1,family="GA", type="right")
gen.trun(par=1,"LOGNO", type="right")
gen.trun(par=c(0,1),"TF", type="both")
ma<-fitDist(str, type="real0to1", extra=c("GAtr", "LOGNOtr", "TFtr"), data=tensile)
## End(Not run)