| R | Fl | A | B | H | L | loc |
|---|---|---|---|---|---|---|
| 693.3 | 50 | 1972 | 0 | 0 | 0 | 2 |
| 422.0 | 54 | 1972 | 0 | 0 | 0 | 2 |
| 736.6 | 70 | 1972 | 0 | 0 | 0 | 2 |
| 732.2 | 50 | 1972 | 0 | 0 | 0 | 2 |
| 1295.1 | 55 | 1893 | 0 | 0 | 0 | 2 |
| 1195.9 | 59 | 1893 | 0 | 0 | 0 | 2 |
R softwareresiduals in GAMLSS
an example; the rent99 data
R packages
GAMLSS uses as residuals the
normalised quantile residuals\(\equiv\) z-scoresPIT and z-scores residualslet \(y_i\) and \(F(y_i, \hat(\theta)_i)\) be the ith observation and its fitted cdf respectively. Then the Probability Integral Transformed (PIT) residuals are
\[u_i = F(y_i, \hat(\theta)_i) \] and the z-scores residuals are
\[z_i = \Phi^{-1}(y_i, \hat(\theta)_i) \]
If the distribution of \(y_i\) is specified correctly then PIT are uniform;
i.e \[u_i \sim U(0,1)\]
and z-scores are normally distributed
i.e. \[z_i \sim NO(0,1)\]
residuals plots against other variables
index
x-variable
parameters
quantilesqqplots
worm plots
density plots
bucket plots
skewness plots
rent| obs number | y | x1 | x2 | x3 | … | xr-1 | xr |
|---|---|---|---|---|---|---|---|
| 1 | y1 | x11 | x12 | x13 | … | x1r-1 | x1r |
| 2 | y2 | x21 | x22 | x23 | … | x2r-1 | x2r |
| 3 | y3 | x31 | x32 | x33 | … | x3r-1 | x3r |
| … | … | … | … | … | … | … | … |
| n-1 | yn-1 | xn-11 | xn-12 | xn-12 | … | xn-1r-1 | xn-1r |
| n | yn | xn1 | xn2 | xn3 | … | xnr-1 | xnr |
| R | Fl | A | B | H | L | loc |
|---|---|---|---|---|---|---|
| 693.3 | 50 | 1972 | 0 | 0 | 0 | 2 |
| 422.0 | 54 | 1972 | 0 | 0 | 0 | 2 |
| 736.6 | 70 | 1972 | 0 | 0 | 0 | 2 |
| 732.2 | 50 | 1972 | 0 | 0 | 0 | 2 |
| 1295.1 | 55 | 1893 | 0 | 0 | 0 | 2 |
| 1195.9 | 59 | 1893 | 0 | 0 | 0 | 2 |
gamlss: the original (needs dist and data)
gamlss.dist: defining the gamlss.family distributions
gamlss.data: for extra data sets
gamlss.add: connect with mgcv, nnet and trees
gamlss.tr: for truncating gamlss.family distributions
gamlss.cens: for censored response variables
gamlss.demo: for demonstrating GAMLSS concepts
gamlss.mx: for fitting finite mixtures
gamboostLSS for GAMLSS boosting
bamlss the Bayesian GAMLSS
gamlss2\(^*\): the new version of GAMLSS
gamlss.ggplots: using ggplot2 within GAMLSS
gamlss.foreach: for parallel computing
gamlss.prepdata: preparation of data before fitting
gamlss.lasso: for LASSO. Ridge and elastic Net regression
gamlss.shiny\(^*\): similar to gamlss.demo
topmodels distributional regression help (not necessary gamlss)
gamlss() for very large data is slow
predict in gamlss is not easy to use
current implementation can cope with only 4 parameters \(\mu\), \(\sigma\), \(\nu\) and \(\tau\)
to connect different estimation statistical approaches
penalised likelihoodBayesianboostingto implement extra algorithms i.e. stepwise, robust
to implement machine learning methodology
CRAN use
install.packages(gamlss)GitHub use
devtools::install_github("gamlss-dev/gamlss2")library(gamlss2)
The Books

www.gamlss.com