Q.stats(obj = NULL, xvar = NULL, resid = NULL, xcut.points = NULL, n.inter = 10,
zvals = TRUE, save = TRUE, plot = TRUE, ...)
obj
. In this case the function behaves diffently (see details below)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 split, with default 10TRUE
the output matrix contains the individual Z-statistics rather that the Q statisticsTRUE
.
In this case the functions produce a matrix giving individual Q (or z) statistics and the final aggregate Q'splot=TRUE
it produces also an graphical represenation of the table.Q.stats
behaves differently depending whether the obj
or the resid
argument is set. The obj
argument produces the Q-statistics (or Z-statistics) table appropriate for centile estimation (therefore it expect a reasonable large number of observations). The argument resid
allows any model residuals, (not necessary GAMLSS), suitable standardised and is appropriate for any size of data. The resulting table contains only the individuals Z-statistics.gamlss
, centiles.split
, wp
data(abdom)
h<-gamlss(y~pb(x), sigma.formula=~pb(x), family=BCT, data=abdom)
Q.stats(h,xvar=abdom$x,n.inter=8)
Q.stats(h,xvar=abdom$x,n.inter=8,zvals=FALSE)
Q.stats(resid=resid(h), xvar=abdom$x, n.inter=5)
rm(h)
Run the code above in your browser using DataLab