Learn R Programming

gamlss.foreach (version 1.1-6)

gamlss.foreach-package: Computational Intensive Functions within GAMLSS

Description

This package is intended for functions needed parallel computations provided by the package foreach.

At the moment the following functions exist:

centiles.boot(), which is designed get bootstrap confidence intervals for centile curves

fitRolling(), rolling regression which is common in time series analysis when one step ahead forecasts is required.

fitPCR(), for univariate principal component regression. I

Arguments

Author

Mikis Stasinopoulos, d.stasinopoulos@londonmet.ac.uk,and Bob Rigby r.rigby@londonmet.ac.uk

Maintainer: Mikis Stasinopoulos, d.stasinopoulos@londonmet.ac.uk

Details

The DESCRIPTION file: tools:::Rd_package_DESCRIPTION("gamlss.foreach") tools:::Rd_package_indices("gamlss.foreach")

References

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.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC, tools:::Rd_expr_doi("10.1201/9780429298547"). An older version can be found in https://www.gamlss.com/.

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, tools:::Rd_expr_doi("10.18637/jss.v023.i07").

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC. tools:::Rd_expr_doi("10.1201/b21973")

(see also https://www.gamlss.com/).

See Also

gamlss,centiles,centiles.pred

Examples

Run this code
# \donttest{
library(gamlss.foreach)
# fixed degrees of freedom
cl <- makePSOCKcluster(2)
registerDoParallel(2)
data(db)
nage <- with(db, age^0.33)
ndb <- data.frame(db, nage)
m1 <- gamlss(head~cs(nage, 12), sigma.fo=~cs(nage,4), nu.fo=~nage, 
             tau.fo=~nage, family=BCT, data=ndb)
test1 <- centiles.boot(m1, xname="nage", xvalues=seq(0.01,20,0.2),B=10, power=0.33)
test1
plot(test1)
# degrees of freedom varying
m2 <- gamlss(head~pb(nage), sigma.fo=~pb(nage), nu.fo=~pb(nage), 
             tau.fo=~pb(nage), family=BCT, data=ndb)
test2 <- centiles.boot(m2, xname="nage", xvalues=seq(0.01,20,0.2),B=10, power=0.33)
stopImplicitCluster()
test2
plot(test2)
# }

Run the code above in your browser using DataLab