When fitting an FDboostLSS model with method = "noncyclic"
the resulting S3-object has the classes nc_mboostLSS
, FDboostLSS
and mboostLSS
in this order. Thus, the defaults specified in FDboost:::cvrisk.FDboostLSS
won't apply. (See code below.)
Two quick ideas would be to A) change the class order, if that's unproblematic, or B), stress that the folds have to be specified manually in the documentation and deprecate FDboost:::cvrisk.FDboostLSS
.
library(FDboost) library(gamboostLSS) ########### simulate Gaussian function-on-scalar data n <- 50 ## number of observations G <- 12 ## number of observations per functional covariate set.seed(123) ## ensure reproducibility n_innerknots <- 4 B <- mboost:::bsplines(1:G, knots = 4, boundary.knots = c(1,G), degree = 2) theta <- rnorm(ncol(B)) ## sample coefficients for x = 1 x <- runif(n) ## sample covariates y <- B %*% matrix( rnorm(n*length(theta), mean = rep(theta, n) * rep(x, each = length(theta)), sd = rep(x, each = length(theta))), ncol = n) ## sample response dat_list <- list(y = t(y), x = x, t = 1:G) ## model fit assuming Gaussian location scale model model <- FDboostLSS(formula = y ~ bols(x, df = 2), timeformula = ~ bbs(t, df = 2), data = dat_list, method = "noncyclic") class(model) ## -> cvrisk.nc_mboostLSS is directly applied debug(cvrisk) cvrisk(model)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4