Description Usage Arguments Details Author(s) References Examples

EXPERIMENTAL!

1 | ```
bl1 %Xc% bl2
``` |

`bl1` |
base-learner 1, e.g. |

`bl2` |
base-learner 2, e.g. |

Combining single base-learners to form new, more complex base-learners, with an identifiability constraint to center the interaction around the intercept and around the two main effects. Suitable for functional response.

Similar to `%X%`

in package mboost, see `%X%`

,
a row tensor product of linear base-learners is returned by `%Xc%`

.
`%Xc%`

applies a sum-to-zero constraint to the design matrix suitable for
functional response if an interaction of two scalar covariates is specified
in the case that the model contains a global intercept and both main effects,
as the interaction is centerd around the intercept and centered around the two main effects.
See Web Appendix A of Brockhaus et al. (2015) for details on how to enforce the constraint
for the functional intercept.
Use e.g. in a model call to `FDboost`

, following the scheme,
`y ~ 1 + bolsc(x1) + bolsc(x2) + bols(x1) %Xc% bols(x2)`

,
where `1`

induces a global intercept and `x1`

, `x2`

are factor variables.

Sarah Brockhaus, David Ruegamer

Brockhaus, S., Scheipl, F., Hothorn, T. and Greven, S. (2015): The functional linear array model. Statistical Modelling, 15(3), 279-300.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ```
######## Example for function-on-scalar-regression with interaction effect of two scalar covariates
data("viscosity", package = "FDboost")
## set time-interval that should be modeled
interval <- "101"
## model time until "interval" and take log() of viscosity
end <- which(viscosity$timeAll == as.numeric(interval))
viscosity$vis <- log(viscosity$visAll[,1:end])
viscosity$time <- viscosity$timeAll[1:end]
# with(viscosity, funplot(time, vis, pch = 16, cex = 0.2))
## fit model with interaction that is centered around the intercept
## and the two main effects
mod1 <- FDboost(vis ~ 1 + bolsc(T_C, df=1) + bolsc(T_A, df=1) +
bols(T_C, df=1) %Xc% bols(T_A, df=1),
timeformula = ~bbs(time, df=6),
numInt = "equal", family = QuantReg(),
offset = NULL, offset_control = o_control(k_min = 9),
data = viscosity, control=boost_control(mstop = 100, nu = 0.4))
## check centering around intercept
colMeans(predict(mod1, which = 4))
## check centering around main effects
colMeans(predict(mod1, which = 4)[viscosity$T_A == "low", ])
colMeans(predict(mod1, which = 4)[viscosity$T_A == "high", ])
colMeans(predict(mod1, which = 4)[viscosity$T_C == "low", ])
colMeans(predict(mod1, which = 4)[viscosity$T_C == "low", ])
## find optimal mstop using cvrsik() or validateFDboost()
## ...
## look at interaction effect in one plot
# funplot(mod1$yind, predict(mod1, which=4))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.