Running 'factorize_test_irregular.R' [164s]
  Running 'factorize_test_regular.R' [174s]
  Running 'general_tests.R' [190s]
Running the tests in 'tests/factorize_test_irregular.R' failed.
Complete output:
  > library(FDboost)
  Loading required package: mboost
  Loading required package: parallel
  Loading required package: stabs
  This is FDboost 1.1-2. 
  > 
  > # generate irregular toy data -------------------------------------------------------
  > 
  > n <- 100
  > m <- 40
  > # covariates
  > x <- seq(0,2,len = n)
  > # time & id
  > set.seed(90384)
  > t <- runif(n = n*m, -pi,pi)
  > id <- sample(1:n, size = n*m, replace = TRUE)
  > 
  > # generate components
  > fx <- ft <- list()
  > fx[[1]] <- exp(x)
  > d <- numeric(2)
  > d[1] <- sqrt(c(crossprod(fx[[1]])))
  > fx[[1]] <- fx[[1]] / d[1]
  > fx[[2]] <- -5*x^2
  > fx[[2]] <- fx[[2]] - fx[[1]] * c(crossprod(fx[[1]], fx[[2]])) # orthogonalize fx[[2]]
  > d[2] <- sqrt(c(crossprod(fx[[2]])))
  > fx[[2]] <- fx[[2]] / d[2]
  > ft[[1]] <- sin(t)
  > ft[[2]] <- cos(t)
  > ft[[1]] <- ft[[1]] / sqrt(sum(ft[[1]]^2))
  > ft[[2]] <- ft[[2]] / sqrt(sum(ft[[2]]^2))
  > 
  > mu1 <- d[1] * fx[[1]][id] * ft[[1]]
  > mu2 <- d[2] * fx[[2]][id] * ft[[2]]
  > # add linear covariate
  > ft[[3]] <- t^2 * sin(4*t) 
  > ft[[3]] <- ft[[3]] - ft[[1]] * c(crossprod(ft[[1]], ft[[3]]))
  > ft[[3]] <- ft[[3]] - ft[[2]] * c(crossprod(ft[[2]], ft[[3]]))
  > ft[[3]] <- ft[[3]] / sqrt(sum(ft[[3]]^2))
  > set.seed(9234)
  > fx[[3]] <- runif(0,3, n = length(x))
  > fx[[3]] <- fx[[3]] - fx[[1]] * c(crossprod(fx[[1]], fx[[3]]))
  > fx[[3]] <- fx[[3]] - fx[[2]] * c(crossprod(fx[[2]], fx[[3]]))
  > d[3] <- sqrt(sum(fx[[3]]^2))
  > fx[[3]] <- fx[[3]] / d[3]
  > 
  > mu3 <- d[3] * fx[[3]][id] * ft[[3]]
  > 
  > mu <- mu1 + mu2 + mu3
  > # add some noise
  > y <- mu + rnorm(length(mu), 0, .01)
  > # and noise covariate
  > z <- rnorm(n)
  > 
  > # fit FDboost model -------------------------------------------------------
  > 
  > dat <- list(y = y, x = x, t = t, x_lin = fx[[3]], id = id)
  > m <- FDboost(y ~ bbs(x, knots = 5, df = 2, differences = 0) + 
  +                # bbs(z, knots = 2, df = 2, differences = 0) + 
  +                bols(x_lin, intercept = FALSE, df = 2)
  +                , ~ bbs(t),
  +              id = ~ id, 
  +              offset = 0, #numInt = "Riemann", 
  +              control = boost_control(nu = 1), 
  +              data = dat)
  > MU <- split(mu, id)
  > PRED <- split(predict(m), id)
  > Ti <- split(t, id)
  > t0 <- seq(-pi, pi, length.out = 40)
  > MU <- do.call(cbind, Map(function(mu, t) approx(t, mu, t0)$y,
  +           MU, Ti)) 
  > PRED <- do.call(cbind, Map(function(mu, t) approx(t, mu, t0)$y,
  +             PRED, Ti))
  > 
  > opar <- par(mfrow = c(2,2))
  > image(t0, x, MU)
  > contour(t0, x, MU, add = TRUE)
  > image(t0, x, PRED)
  > contour(t0, x, PRED, add = TRUE)
  > persp(t0, x, MU, zlim = range(c(MU, PRED), na.rm = TRUE))
  > persp(t0, x, PRED, zlim = range(c(MU, PRED), na.rm = TRUE))
  > par(opar)
  > 
  > # factorize model ---------------------------------------------------------
  > 
  > fac <- factorize(m)
  Warning message:
  In df2lambda(X, df = args$df, lambda = args$lambda, dmat = K, weights = w,  :
    'df' too large:
    Degrees of freedom cannot be larger than the rank of the design matrix.
    Unpenalized base-learner with df = 1 used. Re-consider model specification.
  > 
  > vi <- as.data.frame(varimp(fac$cov))
  > # if(require(lattice))
  > #   barchart(variable ~ reduction, group = blearner, vi, stack = TRUE)
  > 
  > cbind(d^2, sort(vi$reduction, decreasing = TRUE)[1:3])
           [,1]       [,2]
  [1,] 1354.534 13.4692180
  [2,]  385.858  3.8573548
  [3,]   70.049  0.6470387
  > 
  > 
  > x_plot <- list(x, x, fx[[3]])
  > 
  > cols <- c("cornflowerblue", "darkseagreen", "darkred")
  > opar <- par(mfrow = c(3,2))
  > wch <- c(1,2,10)
  > for(w in 1:length(wch)) {
  +   plot.mboost(fac$resp, which = wch[w], col = "darkgrey", ask = FALSE,
  +        main = names(fac$resp$baselearner[wch[w]]))
  +   lines(sort(t), ft[[w]][order(t)]*max(d), col = cols[w], lty = 2)
  +   plot(fac$cov, which = wch[w], 
  +        main = names(fac$cov$baselearner[wch[w]]))
  +   points(x_plot[[w]], d[w] * fx[[w]] / max(d), col = cols[w], pch = 3)
  + }
  > par(opar)
  > 
  > # re-compose predictions
  > preds <- lapply(fac, predict)
  > predf <- rowSums(preds$resp * preds$cov[id, ])
  > PREDf <- split(predf, id)
  > PREDf <- do.call(cbind, Map(function(mu, t) approx(t, mu, t0)$y,
  +                             PREDf, Ti))
  > opar <- par(mfrow = c(1,2))
  > image(t0,x, PRED, main = "original prediction")
  > contour(t0,x, PRED, add = TRUE)
  > image(t0,x,PREDf, main = "recomposed")
  > contour(t0,x, PREDf, add = TRUE)
  > par(opar)
  > 
  > stopifnot(all.equal(PRED, PREDf))
  > 
  > # check out other methods
  > set.seed(8399)
  > newdata_resp <- list(t = sort(runif(60, min(t), max(t))))
  > a <- predict(fac$resp, newdata = newdata_resp, which = 1:5)
  > plot(newdata_resp$t, a[, 1])
  > # coef method
  > cf <- coef(fac$resp, which = 1)
  > 
  > 
  > # check factorization on a new dataset ------------------------------------
  > 
  > t_grid <- seq(-pi,pi,len = 30)
  > x_grid <- seq(0,2,len = 30)
  > x_lin_grid <- seq(min(dat$x_lin), max(dat$x_lin), len = 30)
  > 
  > # use grid data for factorization
  > griddata <- expand.grid(
  +   # time 
  +   t = t_grid,
  +   # covariates
  +   x = x_grid,
  +   x_lin = 0
  + )
  > 
  > griddata_lin <- expand.grid(
  +   t = seq(-pi, pi, len = 30),
  +   x = 0,
  +   x_lin = x_lin_grid
  + )
  > 
  > griddata <- rbind(griddata, griddata_lin)
  > 
  > griddata$id <- as.numeric(factor(paste(griddata$x, griddata$x_lin, sep = ":")))
  > 
  > fac2 <- factorize(m, newdata = griddata)
  Warning message:
  In df2lambda(X, df = args$df, lambda = args$lambda, dmat = K, weights = w,  :
    'df' too large:
    Degrees of freedom cannot be larger than the rank of the design matrix.
    Unpenalized base-learner with df = 1 used. Re-consider model specification.
  > 
  > ratio <- -max(abs(predict(fac$resp, which = 1))) / max(abs(predict(fac2$resp, which = 1)))
  > 
  > opar <- par(mfrow = c(3,2))
  > wch <- c(1,2,10)
  > for(w in 1:length(wch)) {
  +   plot.mboost(fac$resp, which = wch[w], col = "darkgrey", ask = FALSE,
  +                                 main = names(fac$resp$baselearner[wch[w]]))
  +   
  +   lines(sort(griddata$t), 
  +         ratio*predict(fac2$resp, which = wch[w])[order(griddata$t)], 
  +         col = cols[w], lty = 2)
  +   plot(fac$cov, which = wch[w], 
  +        main = names(fac$cov$baselearner[wch[w]]))
  +   this_x <- fac2$cov$model.frame(which = wch[w])[[1]][[1]]
  +     lines(sort(this_x), 1/ratio*predict(fac2$cov, which = wch[w])[order(this_x)], 
  +           col = cols[w], lty = 1)
  + }
  > par(opar)
  > 
  > # check predictions
  > p <- predict(fac2$resp, which = 1)
  > 
  > proc.time()
     user  system elapsed 
     3.28    0.34    3.56 
Running the tests in 'tests/factorize_test_regular.R' failed.
Complete output:
  > library(FDboost)
  Loading required package: mboost
  Loading required package: parallel
  Loading required package: stabs
  This is FDboost 1.1-2. 
  > 
  > # generate regular toy data --------------------------------------------------
  > 
  > n <- 100
  > m <- 40
  > # covariates
  > x <- seq(0,2,len = n)
  > # time 
  > t <- seq(-pi,pi,len = m)
  > # generate components
  > fx <- ft <- list()
  > fx[[1]] <- exp(x)
  > d <- numeric(2)
  > d[1] <- sqrt(c(crossprod(fx[[1]])))
  > fx[[1]] <- fx[[1]] / d[1]
  > fx[[2]] <- -5*x^2
  > fx[[2]] <- fx[[2]] - fx[[1]] * c(crossprod(fx[[1]], fx[[2]])) # orthogonalize fx[[2]]
  > d[2] <- sqrt(c(crossprod(fx[[2]])))
  > fx[[2]] <- fx[[2]] / d[2]
  > ft[[1]] <- sin(t)
  > ft[[2]] <- cos(t)
  > ft[[1]] <- ft[[1]] / sqrt(sum(ft[[1]]^2))
  > ft[[2]] <- ft[[2]] / sqrt(sum(ft[[2]]^2))
  > mu1 <- d[1] * fx[[1]] %*% t(ft[[1]])
  > mu2 <- d[2] * fx[[2]] %*% t(ft[[2]])
  > # add linear covariate
  > ft[[3]] <- t^2 * sin(4*t) 
  > ft[[3]] <- ft[[3]] - ft[[1]] * c(crossprod(ft[[1]], ft[[3]]))
  > ft[[3]] <- ft[[3]] - ft[[2]] * c(crossprod(ft[[2]], ft[[3]]))
  > ft[[3]] <- ft[[3]] / sqrt(sum(ft[[3]]^2))
  > set.seed(9234)
  > fx[[3]] <- runif(0,3, n = length(x))
  > fx[[3]] <- fx[[3]] - fx[[1]] * c(crossprod(fx[[1]], fx[[3]]))
  > fx[[3]] <- fx[[3]] - fx[[2]] * c(crossprod(fx[[2]], fx[[3]]))
  > d[3] <- sqrt(sum(fx[[3]]^2))
  > fx[[3]] <- fx[[3]] / d[3]
  > mu3 <- d[3] * fx[[3]] %*% t(ft[[3]])
  > 
  > mu <- mu1 + mu2 + mu3
  > # add some noise
  > y <- mu + rnorm(length(mu), 0, .01)
  > # and noise covariate
  > z <- rnorm(n)
  > 
  > # fit FDboost model -------------------------------------------------------
  > 
  > dat <- list(y = y, x = x, t = t, x_lin = fx[[3]])
  > m <- FDboost(y ~ bbs(x, knots = 5, df = 2, differences = 0) + 
  +                # bbs(z, knots = 2, df = 2, differences = 0) + 
  +                bols(x_lin, intercept = FALSE, df = 2)
  +                , ~ bbs(t), offset = 0, 
  +              control = boost_control(nu = 1), 
  +              data = dat)
  > 
  > opar <- par(mfrow = c(1,2))
  > image(t, x, t(mu))
  > contour(t, x, t(mu), add = TRUE)
  > image(t, x, t(predict(m)))
  > contour(t, x, t(predict(m)), add = TRUE)
  > par(opar)
  > 
  > # factorize model ---------------------------------------------------------
  > 
  > fac <- factorize(m)
  Warning message:
  In df2lambda(X, df = args$df, lambda = args$lambda, dmat = K, weights = w,  :
    'df' too large:
    Degrees of freedom cannot be larger than the rank of the design matrix.
    Unpenalized base-learner with df = 1 used. Re-consider model specification.
  > 
  > vi <- as.data.frame(varimp(fac$cov))
  > # if(require(lattice))
  > #   barchart(variable ~ reduction, group = blearner, vi, stack = TRUE)
  > 
  > cbind(d^2, vi$reduction[c(1:2, 10)])
           [,1]       [,2]
  [1,] 1354.534 13.4040963
  [2,]  385.858  3.8236401
  [3,]   70.049  0.6499127
  > 
  > 
  > x_plot <- list(x, x, fx[[3]])
  > 
  > cols <- c("cornflowerblue", "darkseagreen", "darkred")
  > opar <- par(mfrow = c(3,2))
  > wch <- c(1,2,10)
  > for(w in 1:length(wch)) {
  +   plot.mboost(fac$resp, which = wch[w], col = "darkgrey", ask = FALSE,
  +        main = names(fac$resp$baselearner[wch[w]]))
  +   lines(t, ft[[w]]*max(d), col = cols[w], lty = 2)
  +   plot(fac$cov, which = wch[w], 
  +        main = names(fac$cov$baselearner[wch[w]]))
  +   points(x_plot[[w]], d[w] * fx[[w]] / max(d), col = cols[w], pch = 3)
  + }
  > par(opar)
  > 
  > # re-compose prediction
  > preds <- lapply(fac, predict)
  > PREDSf <- array(0, dim = c(nrow(preds$resp),nrow(preds$cov)))
  > for(i in 1:ncol(preds$resp))
  +   PREDSf <- PREDSf + preds$resp[,i] %*% t(preds$cov[,i])
  > 
  > opar <- par(mfrow = c(1,2))
  > image(t,x, t(predict(m)), main = "original prediction")
  > contour(t,x, t(predict(m)), add = TRUE)
  > image(t,x,PREDSf, main = "recomposed")
  > contour(t,x, PREDSf, add = TRUE)
  > par(opar)
  > # => matches
  > stopifnot(all.equal(as.numeric(t(predict(m))), as.numeric(PREDSf)))
  > 
  > # check out other methods
  > set.seed(8399)
  > newdata_resp <- list(t = sort(runif(60, min(t), max(t))))
  > a <- predict(fac$resp, newdata = newdata_resp, which = 1:5)
  > plot(newdata_resp$t, a[, 1])
  > # coef method
  > cf <- coef(fac$resp, which = 1)
  > 
  > 
  > proc.time()
     user  system elapsed 
     2.18    0.37    2.56 
Running the tests in 'tests/general_tests.R' failed.
Complete output:
  > 
  > 
  > library(FDboost)
  Loading required package: mboost
  Loading required package: parallel
  Loading required package: stabs
  This is FDboost 1.1-2. 
  > library(gamboostLSS)
  
  Attaching package: 'gamboostLSS'
  
  The following object is masked from 'package:stats':
  
      model.weights
  
  > 
  > # print(sessionInfo())
  > 
  > # simulated data ----------------------------------------------------------
  > 
  > 
  > if(require(refund)){
  +   
  +   ## simulate a small data set 
  +   print("simulate data")
  +   set.seed(230)
  +   pffr_data <- pffrSim(n = 25, nxgrid = 21, nygrid = 19)
  +   pffr_data$X1 <- scale(pffr_data$X1, scale = FALSE)
  +   
  +   dat <- as.list(pffr_data)
  +   dat$tvals <- attr(pffr_data, "yindex")
  +   dat$svals <- attr(pffr_data, "xindex")
  +   
  +   dat$Y_scalar <- dat$Y[ , 10]
  +   
  +   dat$Y_long <- c(dat$Y)
  +   dat$tvals_long <- rep(dat$tvals, each = nrow(dat$Y))
  +   dat$id_long <- rep(1:nrow(dat$Y), ncol(dat$Y))
  +   
  +   # second functional covariate
  +   dat$s2 <- seq(0, 1, l = 15)
  +   dat$X2 <- I(matrix(rnorm(25 * 15), nrow = 25))
  +   dat$X2 <- scale(dat$X2, scale = FALSE)
  +   
  + 
  +   # model fit ---------------------------------------------------------------
  + 
  +   print("model fit")
  +   
  +   ## response matrix for response observed on one common grid 
  +   m <- FDboost(Y ~ 1 + bhist(X1, svals, tvals, knots = 10, df = 6) 
  +                + bsignal(X1, svals, knots = 6, df = 3)
  +                + bbsc(xsmoo, knots = 6, df = 3) 
  +                + bolsc(xte1, df = 3)
  +                + brandomc(xte2, df = 3), 
  +                timeformula = ~ bbs(tvals, knots = 9, df = 2, differences = 1), 
  +                control = boost_control(mstop = 10), data = dat)
  +   
  +   ## response in long format
  +   ml <- FDboost(Y_long ~ 1 + bhist(X1, svals, tvals_long, knots = 6, df = 12) 
  +                 + bsignal(X1, svals, knots = 6, df = 4)
  +                 + bbsc(xsmoo, knots = 6, df = 4) 
  +                 + bolsc(xte1, df = 4)
  +                 + brandomc(xte2, df = 4), 
  +                 timeformula = ~ bbs(tvals_long, knots = 8, df = 3, differences = 1), 
  +                 id = ~ id_long, 
  +                 offset_control = o_control(k_min = 10), 
  +                 control = boost_control(mstop = 10), data = dat)
  +   
  +   ## scalar response 
  +   ms <- FDboost(Y_scalar ~ 1 + bsignal(X1, svals, knots = 6, df = 2)
  +                 + bbs(xsmoo, knots = 6, df = 2, differences = 1) 
  +                 + bols(xte1, df = 2) 
  +                 + bols(xte2, df = 2)
  +                 + bols(xfactor, df = 2), 
  +                 timeformula = NULL, 
  +                 control = boost_control(mstop = 50), data = dat)
  +   
  +   ## scalar response and interaction effect between two functional variables
  +   ms_funint <- FDboost(Y_scalar ~ 1 + 
  +                          bsignal(X1, svals, knots = 9, df = 3) %X% bsignal(X2, s2, knots = 9, df = 3), 
  +                 timeformula = NULL, 
  +                 control = boost_control(mstop = 50), data = dat)
  +   
  +   ## GAMLSS with functional response 
  +   mlss <- FDboostLSS(Y ~ 1 + bsignal(X1, svals, knots = 6, df = 3)               
  +                      + bbsc(xsmoo, knots = 6, df = 3) 
  +                      + bolsc(xte1, df = 3), 
  +                      timeformula = ~ bbs(tvals, knots = 9, df = 3, differences = 1), 
  +                      control = boost_control(mstop = 20), data = dat, 
  +                      method = "noncyclic")
  +   
  +   ## GAMLSS with scalar response 
  +   mslss <- FDboostLSS(Y_scalar ~ 1 + bsignal(X1, svals, knots = 6, df = 3)
  +                       + bbs(xsmoo, knots = 6, df = 3, differences = 1), 
  +                       timeformula = NULL, 
  +                       control = boost_control(mstop = 50), data = dat, 
  +                       method = "noncyclic")
  +   
  +   ## response matrix with factor + continuous time variable
  +   
  +   # linear array model implemented only for matrices
  +   # => tvals and factor for dimensions have to be flattened
  +   dat2D <- with(dat, expand.grid(
  +     tvals = tvals, 
  +     xfactor = factor(2:3)
  +   ))
  +   dat2D <- as.list(dat2D[order(dat2D$xfactor), ])
  +   dat2D$Y <- cbind(
  +     dat$Y[dat$xfactor == "2", ],
  +     dat$Y[dat$xfactor == "3", ]
  +     )
  +   dat2D$xsmoo <- dat$xsmoo[dat$xfactor == "2"] 
  +     
  +   m2D <- FDboost(Y ~ bbsc(xsmoo), 
  +                  timeformula = ~ bols(xfactor) %X% bbs(tvals),
  +                  control = boost_control(mstop = 20), 
  +                  data = dat2D)
  +   
  +   
  +   # test some methods and utility functions  --------------------------------
  +   
  +   ## test plot()
  +   print("plot effects")
  +   par(mfrow = c(1,1))
  +   plot(m, ask = FALSE)
  +   plot(ml, ask = FALSE)
  +   plot(ms, ask = FALSE)
  +   plot(mlss$mu, ask = FALSE) 
  +   plot(mlss$sigma, ask = FALSE)
  +   
  +   ## test applyFolds()
  +   print("run applyFolds")
  +   set.seed(123)
  +   applyFolds(m, folds = cv(rep(1, length(unique(m$id))), B = 2), grid = 0:5)
  +   #applyFolds(ml, folds = cv(rep(1, length(unique(ml$id))), B = 2), grid = 0:5)
  +   #applyFolds(ms, folds = cv(rep(1, length(unique(ms$id))), B = 2), grid = 0:5)
  + 
  +   ## test cvrisk()
  +   print("run cvrisk")
  +   set.seed(123)
  +   cvrisk(m, folds = cvLong(id = m$id, weights = model.weights(m), B = 2), grid = 0:5)
  +   cvrisk(ml, folds = cvLong(id = ml$id, weights = model.weights(ml), B = 2), grid = 0:5)
  +   cvrisk(ms, folds = cvLong(id = ms$id, weights = model.weights(ms), B = 2), grid = 0:5)
  +   cvrisk(ms_funint, folds = cvLong(id = ms$id, weights = model.weights(ms), B = 2), grid = 0:5)
  +   
  +   cvrisk(mlss, folds = cv(model.weights(mlss[[1]]), B = 2),
  +          grid = 1:5, trace = FALSE)
  +   cvrisk(mslss, folds = cv(model.weights(mslss[[1]]), B = 2),
  +          grid = 1:5, trace = FALSE)
  +   
  +   cvrisk(m2D, folds = cv(model.weights(m2D), B = 2),
  +          grid = 1:5)
  +   
  +   ## test stabsel (use very small number of folds, B = 10, to speed up testing)
  +   print("run stabsel")
  +   stabsel(m, cutoff=0.8, PFER = 0.1*length(m$baselearner), sampling.type = "SS", eval = TRUE, B = 3)
  +   stabsel(m, cutoff=0.8, PFER = 0.1*length(m$baselearner), sampling.type = "SS", eval = TRUE, B = 3, 
  +           refitSmoothOffset = FALSE)
  +   
  +   ## FIXME: this stabsel() should also work with refitSmoothOffset = TRUE 
  +   stabsel(ml, cutoff=0.8, PFER = 0.1*length(ml$baselearner), sampling.type = "SS", eval = TRUE, B = 3, 
  +           refitSmoothOffset = FALSE)
  +   stabsel(ms, cutoff=0.8, PFER = 0.1*length(ms$baselearner), sampling.type = "SS", eval = TRUE, B = 3)
  +   ## FIXME: this is broken again 
  +   ## fixed in gamboostLSS package on github with commit 4989474 
  +   ##stabsel(mlss, cutoff=0.8, PFER = 0.1*length(mlss$mu$baselearner), sampling.type = "SS", eval = TRUE, B = 3)
  +   ##stabsel(mslss, cutoff=0.8, PFER = 0.1*length(mslss$mu$baselearner), sampling.type = "SS", eval = TRUE, B = 3)
  +   
  +   
  +   ## test predict with newdata
  +   print("predict with new data")
  +   pred <- predict(m, newdata = dat)
  +   ## for this predict() with newdata, you need a data.frame where the irregular time of y fits with X
  +   ## pred <- predict(ml, newdata = dat)
  +   pred <- predict(ms, newdata = dat)
  +   pred <- predict(ms_funint, newdata = dat)
  +   pred <- predict(mlss, newdata = dat)
  +   pred <- predict(mslss, newdata = dat)
  +   
  + }
  Loading required package: refund
  [1] "simulate data"
  [1] "model fit"
  Use a smooth offset.
  Use a smooth offset for irregular data.
  No smooth offsets over time are used, just global scalar offsets.
  No integration weights are used to compute the loss for the functional response.
  [1] "plot effects"
  [1] "run applyFolds"
  ..[1] "run cvrisk"
  The smooth offset is fixed over all folds.
  For brandomc, the transformation matrix Z is fixed over all folds.
  For bolsc, the transformation matrix Z is fixed over all folds.
  For bbsc, the transformation matrix Z is fixed over all folds.
  The smooth offset is fixed over all folds.
  For brandomc, the transformation matrix Z is fixed over all folds.
  For bolsc, the transformation matrix Z is fixed over all folds.
  For bbsc, the transformation matrix Z is fixed over all folds.
  For bbsc, the transformation matrix Z is fixed over all folds.
  [1] "run stabsel"
  Use applyFolds() to recompute the smooth offset in each fold.
  The smooth offset is fixed over all folds.
  For brandomc, the transformation matrix Z is fixed over all folds.
  For bolsc, the transformation matrix Z is fixed over all folds.
  For bbsc, the transformation matrix Z is fixed over all folds.
  The smooth offset is fixed over all folds.
  For brandomc, the transformation matrix Z is fixed over all folds.
  For bolsc, the transformation matrix Z is fixed over all folds.
  For bbsc, the transformation matrix Z is fixed over all folds.
  [1] "predict with new data"
  There were 37 warnings (use warnings() to see them)
  > 
  > 
  > 
  > # sof: fuel data ----------------------------------------------------------
  > 
  > print("run checks with fuel data")
  [1] "run checks with fuel data"
  > 
  > ## prediction with functional variable as numeric matrix, see Issue #17
  > data(fuelSubset)
  > fuel <- fuelSubset[c('heatan', 'h2o', 'UVVIS', 'uvvis.lambda')]
  > str(fuel$UVVIS) # numeric matrix
   num [1:129, 1:134] 0.145 -1.584 -0.814 -1.311 -1.373 ...
  > 
  > sof <- FDboost(heatan ~ bsignal(UVVIS, uvvis.lambda, knots = 20, df = 4) + 
  +                  bbs(h2o, df = 4),
  +                timeformula = ~bols(1), data = fuel)
  UVVIS is not centered per column, inducing a non-centered effect.
  Warning message:
  In .qr.rank.def.warn(r) :
    matrix is structurally rank deficient; using augmented matrix with additional 2 row(s) of zeros
  > 
  > # Predict with newdata
  > pred <- predict(sof, newdata = fuel)
  > 
  > # with interaction term
  > sof_int <- FDboost(heatan ~ bsignal(UVVIS, uvvis.lambda, knots = 9, df = 9) + 
  +                  bsignal(NIR, nir.lambda, knots = 9, df = 9) +
  +                  bsignal(UVVIS, uvvis.lambda, knots = 9, df = 3) %X% bsignal(NIR, nir.lambda, knots = 9, df = 3),
  +                timeformula = ~bols(1), data = fuelSubset)
  UVVIS is not centered per column, inducing a non-centered effect.
  NIR is not centered per column, inducing a non-centered effect.
  UVVIS is not centered per column, inducing a non-centered effect.
  NIR is not centered per column, inducing a non-centered effect.
  > 
  > # Predict with newdata
  > pred <- predict(sof_int, newdata = fuelSubset)
  > 
  > 
  > 
  > # fof: fuel data -----------------------------------------------------------
  > 
  > ## model does not make sense, but is good for checking
  > 
  > # function-on-function with bsignal
  > fof <- FDboost(UVVIS ~ bsignal(NIR, nir.lambda, knots = 9, df = 9),
  +                timeformula = ~ bbs(uvvis.lambda), data = fuelSubset)
  NIR is not centered per column, inducing a non-centered effect.
  > 
  > pred <- predict(fof, newdata = fuelSubset)
  > 
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
    15.39    1.25   16.60