centiles function but the range of x is split at a user defined values xcut.point into r separate ranges.
The functions also tabulates the sample percentages below each centile curve for each of the r ranges of x
(for comparison with the model percentage given by cent)
The model should have only one explanatory variable.centiles.split(obj, xvar = NULL, xcut.points = NULL, n.inter = 4,
cent = c(0.4, 2, 10, 25, 50, 75, 90, 98, 99.6),
legend = FALSE, main = NULL, main.gsub = "@",
ylab = "y", xlab = "x", ylim = NULL, overlap = 0,
save = TRUE, plot = TRUE, ...)c(20,30). If xcut.points=NULL then the n.inter argument is activatedxcut.points=NULL this argument gives the number of intervals in which the x-variable will be splited, with default 4legent=FALSEmain.gsub (with default "@") appears in the main
title then it is substituted with the default title.xvar intervals. Default value is overlap=0 for non overlapping intervalsTRUE.
In this case the functions produce a matrix giving the sample percentages for each intervalgamlss centiles, centiles.comdata(abdom)
h<-gamlss(y~pb(x), sigma.formula=~pb(x), family=BCT, data=abdom)
mout <- centiles.split(h,xvar=abdom$x)
mout
rm(h,mout)Run the code above in your browser using DataLab