* using log directory ‘/data/gannet/ripley/R/packages/tests-Suggests/gamboostLSS.Rcheck’ * using R Under development (unstable) (2025-12-22 r89219) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2) GNU Fortran (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2) * running under: Fedora Linux 42 (Workstation Edition) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘gamboostLSS/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘gamboostLSS’ version ‘2.1-0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘gamboostLSS’ can be installed ... [18s/51s] OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... [4s/11s] OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [32s/45s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking sizes of PDF files under ‘inst/doc’ ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... ERROR Running examples in ‘gamboostLSS-Ex.R’ failed The error most likely occurred in: > ### Name: as.families > ### Title: Include 'gamlss' families in the boosting framework of > ### 'gamboostLSS' > ### Aliases: as.families gamlss.Families gamlss1parMu gamlss2parMu > ### gamlss2parSigma gamlss3parMu gamlss3parSigma gamlss3parNu > ### gamlss4parMu gamlss4parSigma gamlss4parNu gamlss4parTau > ### Keywords: models distributions > > ### ** Examples > > ## simulate small example > set.seed(123) > x <- runif(1000) > > y <- rnorm(mean = 2 + 3 * x, # effect on mu + sd = exp( 1 - 1 * x ), # effect on sigma + n = 1000) > > ## boosting > glmss <- glmboostLSS(y ~ x, families = as.families("NO")) Error in as.families("NO") : Please install package 'gamlss.dist' for using gamlss families. Calls: glmboostLSS -> mboostLSS_fit -> as.families Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘bugfixes.R’ [5s/11s] Running ‘regtest-families.R’ Running ‘regtest-gamboostLSS.R’ [10s/18s] Running ‘regtest-glmboostLSS.R’ [4s/10s] Running ‘regtest-mstop.R’ [6s/12s] Running ‘regtest-noncyclic_fitting.R’ [15s/20s] Running ‘regtest-stabilization.R’ [14s/25s] Running ‘regtest-stabsel.R’ [14s/17s] [73s/123s] ERROR Running the tests in ‘tests/bugfixes.R’ failed. Complete output: > ### > # Bugfixes > > require("gamboostLSS") Loading required package: gamboostLSS Loading required package: mboost Loading required package: parallel Loading required package: stabs Attaching package: 'gamboostLSS' The following object is masked from 'package:stats': model.weights > require("gamlss") Loading required package: gamlss Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'gamlss' > > ## subset method was missing if initial mstop = 1 > set.seed(1907) > x1 <- rnorm(1000) > x2 <- rnorm(1000) > x3 <- rnorm(1000) > x4 <- rnorm(1000) > x5 <- rnorm(1000) > x6 <- rnorm(1000) > mu <- exp(1.5 + x1^2 +0.5 * x2 - 3 * sin(x3) -1 * x4) > sigma <- exp(-0.2 * x4 +0.2 * x5 +0.4 * x6) > y <- numeric(1000) > for( i in 1:1000) + y[i] <- rnbinom(1, size = sigma[i], mu = mu[i]) > dat <- data.frame(x1, x2, x3, x4, x5, x6, y) > > model <- gamboostLSS(y ~ ., families = NBinomialLSS(), data = dat, + control = boost_control(mstop = 1)) > model[10] LSS Models fitted via Model-based Boosting Call: gamboostLSS(formula = y ~ ., data = dat, families = NBinomialLSS(), control = boost_control(mstop = 1)) Number of boosting iterations (mstop): mu = 10, sigma = 10 Step size: mu = 0.1, sigma = 0.1 Families: Negative Negative-Binomial Likelihood: mu (log link) Loss function: -(lgamma(y + sigma) - lgamma(sigma) - lgamma(y + 1) + sigma * log(sigma) + y * f - (y + sigma) * log(exp(f) + sigma)) Negative Negative-Binomial Likelihood: sigma (log link) Loss function: -(lgamma(y + exp(f)) - lgamma(exp(f)) - lgamma(y + 1) + exp(f) * f + y * log(mu) - (y + exp(f)) * log(mu + exp(f))) > > > ## selected() was broken (didn't call mboost-function) > stopifnot(all.equal(selected(model), + list(mu = mboost::selected(model[[1]]), + sigma = mboost::selected(model[[2]])))) > > # If the families argument is not specified explicitly in mboostLSS one gets an > # error in cvrisk.mboostLSS() (spotted by Almond Stöcker). > # (https://github.com/boost-R/gamboostLSS/issues/9) > set.seed(1907) > x1 <- rnorm(1000) > mu <- 2*x1 > sigma <- rep(1, 1000) > y <- numeric(1000) > for( i in 1:1000) + y[i] <- rnorm(1, mean = mu[i], sd=sigma[i]) > dat <- data.frame(x1=x1, y=y) > ## model with default families > model <- mboostLSS(y ~ bbs(x1), data = dat, control = boost_control(mstop = 2)) > ## cvrisk.mboostLSS() does not work as families was not specified in model call > cvr <- try(cvrisk(model, folds = cv(model.weights(model), B=3), trace=FALSE), + silent = TRUE) Warning message: In make.grid(mstop(object)) : Duplicates produced; Only unique values are returned > if (inherits(cvr, "try-error")) + stop("cvrisk does not work if no family was (explicitly) chosen") > > > # Make sure that gamlss.dist::BB and gamlss.dist::BI work (spotted by F. Scheipl) > # (https://github.com/boost-R/gamboostLSS/issues/12) > set.seed(123) > n <- 100 > x <- rnorm(n) > z <- rnorm(n) > data <- data.frame(y = rbinom(n, p = plogis(x + z), size = 60), x = x, z= z) > data$ymat <- with(data, cbind(success = data$y, fail = 60 - data$y)) > > m1 <- gamlss(ymat ~ x + z, data = data, family = BB) Error in gamlss(ymat ~ x + z, data = data, family = BB) : could not find function "gamlss" Execution halted Running the tests in ‘tests/regtest-families.R’ failed. Complete output: > ### > # check families > > require("gamboostLSS") Loading required package: gamboostLSS Loading required package: mboost Loading required package: parallel Loading required package: stabs Attaching package: 'gamboostLSS' The following object is masked from 'package:stats': model.weights > require("gamlss") Loading required package: gamlss Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'gamlss' > > > ### check families with only one offset specified (other to choose via optim) > set.seed(1907) > n <- 5000 > x1 <- runif(n) > x2 <- runif(n) > mu <- 2 -1*x1 - 3*x2 > sigma <- exp(-1*x1 + 3*x2) > df <- exp(1 + 3*x1 + 1*x2) > y <- rTF(n = n, mu = mu, sigma = sigma, nu = df) Error in rTF(n = n, mu = mu, sigma = sigma, nu = df) : could not find function "rTF" Execution halted Running the tests in ‘tests/regtest-glmboostLSS.R’ failed. Complete output: > ### > # check glmboostLSS() > > require("gamboostLSS") Loading required package: gamboostLSS Loading required package: mboost Loading required package: parallel Loading required package: stabs Attaching package: 'gamboostLSS' The following object is masked from 'package:stats': model.weights > require("gamlss") Loading required package: gamlss Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'gamlss' > > set.seed(1907) > n <- 5000 > x1 <- runif(n) > x2 <- runif(n) > mu <- 2 -1*x1 - 3*x2 > sigma <- exp(-1*x1 + 3*x2) > df <- exp(1 + 3*x1 + 1*x2) > y <- rTF(n = n, mu = mu, sigma = sigma, nu = df) Error in rTF(n = n, mu = mu, sigma = sigma, nu = df) : could not find function "rTF" Execution halted Running the tests in ‘tests/regtest-stabilization.R’ failed. Complete output: > ### > # test functionality of stabilization > > require("gamboostLSS") Loading required package: gamboostLSS Loading required package: mboost Loading required package: parallel Loading required package: stabs Attaching package: 'gamboostLSS' The following object is masked from 'package:stats': model.weights > > ## simulate Gaussian data > set.seed(0804) > x1 <- runif(1000) > x2 <- runif(1000) > x3 <- runif(1000) > x4 <- runif(1000) > mu <- 1.5 +1 * x1 +4 * x2 > sigma <- exp(1 - 0.2 * x3 -0.4 * x4) > y <- rnorm(mean = mu, sd = sigma, n = length(mu)) > dat <- data.frame(x1, x2, x3, x4, y) > > ## do not use stabilization > m1 <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families=GaussianLSS(), + data=dat) > coef(m1) $mu (Intercept) x1 x2 -1.9916597 0.2601562 3.6573948 attr(,"offset") [1] 4.075487 $sigma (Intercept) x1 x2 x3 x4 0.07184243 -0.08466051 0.14507711 -0.20507878 -0.34966371 attr(,"offset") [1] 0.8534752 > > ## use stabilization via options (for backwards compatibility) > options(gamboostLSS_stab_ngrad = TRUE) > m2 <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families=GaussianLSS(), + data=dat) Warning messages: 1: In check_stabilization(stabilization) : Usage of 'options(gamboostLSS_stab_ngrad = TRUE)' is deprecated. Use argument 'stabilization' in the fitting family. See ?Families for details. 2: In check_stabilization(stabilization) : 'stabilization' is set to "MAD" > coef(m2) $mu (Intercept) x1 x2 -2.5558491 0.8170992 4.2184347 attr(,"offset") [1] 4.075487 $sigma (Intercept) x1 x2 x3 x4 0.1071746 -0.1188396 0.1373902 -0.2372693 -0.3712830 attr(,"offset") [1] 0.8534752 > options(gamboostLSS_stab_ngrad = FALSE) > > ## now use novel interface via families: > m3 <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = GaussianLSS(stabilization = "MAD"), + data=dat) > stopifnot(all.equal(coef(m3), coef(m2))) > > ## check if everything is handled correctly > GaussianLSS(stabilization = "MAD") $mu Normal distribution: mu(id link) Loss function: -dnorm(x = y, mean = f, sd = sigma, log = TRUE) $sigma Normal distribution: sigma (log link) Loss function: -dnorm(x = y, mean = mu, sd = exp(f), log = TRUE) attr(,"class") [1] "families" attr(,"qfun") function (p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE) { qnorm(p = p, mean = mu, sd = sigma, lower.tail = lower.tail, log.p = log.p) } attr(,"name") [1] "Gaussian" > GaussianLSS(stabilization = "L2") $mu Normal distribution: mu(id link) Loss function: -dnorm(x = y, mean = f, sd = sigma, log = TRUE) $sigma Normal distribution: sigma (log link) Loss function: -dnorm(x = y, mean = mu, sd = exp(f), log = TRUE) attr(,"class") [1] "families" attr(,"qfun") function (p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE) { qnorm(p = p, mean = mu, sd = sigma, lower.tail = lower.tail, log.p = log.p) } attr(,"name") [1] "Gaussian" > GaussianLSS(stabilization = "none") $mu Normal distribution: mu(id link) Loss function: -dnorm(x = y, mean = f, sd = sigma, log = TRUE) $sigma Normal distribution: sigma (log link) Loss function: -dnorm(x = y, mean = mu, sd = exp(f), log = TRUE) attr(,"class") [1] "families" attr(,"qfun") function (p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE) { qnorm(p = p, mean = mu, sd = sigma, lower.tail = lower.tail, log.p = log.p) } attr(,"name") [1] "Gaussian" > res <- try(GaussianLSS(stabilization = "test"), silent = TRUE) > res [1] "Error in match.arg(stabilization) : \n 'arg' should be one of \"none\", \"MAD\", \"L2\"\n" attr(,"class") [1] "try-error" attr(,"condition") > > > ############################################################ > ## continue these checks for other families > dat$y <- runif(1000, min = 0.01, max = 0.99) > FAMILIES <- list( + GaussianLSS, + GammaLSS, + BetaLSS, + StudentTLSS) > for (i in 1:length(FAMILIES)) { + m_none <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = FAMILIES[[i]](stabilization = "none"), + data=dat) + m_MAD <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = FAMILIES[[i]](stabilization = "MAD"), + data=dat) + m_L2 <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = FAMILIES[[i]](stabilization = "L2"), + data=dat) + + stopifnot(tail(risk(m_none, merge = TRUE), 1) != tail(risk(m_MAD, merge = TRUE), 1)) + cat('Risks:\n stabilization = "none":', + tail(risk(m_none, merge = TRUE), 1), + '\n stabilization = "MAD":', + tail(risk(m_MAD, merge = TRUE), 1), + '\n stabilization = "L2":', + tail(risk(m_L2, merge = TRUE), 1), "\n") + } Risks: stabilization = "none": 126.3867 stabilization = "MAD": 126.3865 stabilization = "L2": 126.3866 Risks: stabilization = "none": 152.9363 stabilization = "MAD": 151.7991 stabilization = "L2": 152.3966 Risks: stabilization = "none": -16.74875 stabilization = "MAD": -16.85658 stabilization = "L2": -16.81103 Risks: stabilization = "none": 126.3869 stabilization = "MAD": 126.3865 stabilization = "L2": 126.3867 > > ## check as.families interface for 2:4 parametric families > dat$y <- rnorm(1000, mean = 10, sd = 1) > FAMILIES <- list( + "NO", + "TF") > for (i in 1:length(FAMILIES)) { + m_none <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = as.families(FAMILIES[[i]], stabilization = "none"), + data=dat) + m_MAD <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = as.families(FAMILIES[[i]], stabilization = "MAD"), + data=dat) + m_L2 <- glmboostLSS(y ~ x1 + x2 + x3 + x4, + families = as.families(FAMILIES[[i]], stabilization = "L2"), + data=dat) + cat('Risks:\n stabilization = "none":', + tail(risk(m_none, merge = TRUE), 1), + '\n stabilization = "MAD":', + tail(risk(m_MAD, merge = TRUE), 1), + '\n stabilization = "L2":', + tail(risk(m_L2, merge = TRUE), 1), "\n") + } Error in as.families(FAMILIES[[i]], stabilization = "none") : Please install package 'gamlss.dist' for using gamlss families. Calls: glmboostLSS -> mboostLSS_fit -> as.families Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ...