Running ‘factorize_test_irregular.R’ [2s/3s]
  Running ‘factorize_test_regular.R’ [2s/3s]
  Running ‘general_tests.R’ [14s/17s]
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-4. 
  > 
  > # 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,  :*** buffer overflow detected ***: terminated
  Aborted
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-4. 
  > 
  > # 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,  :*** buffer overflow detected ***: terminated
  Aborted