e.g., \beta(x) * z. I would like this to be specified by p(z, by=x, linear=FALSE, tv=FALSE), similar to mgcv::s(). Needs to check if x is continuous: if it is logical/factor, this would be fit more easily as an interaction using x*z in the formula.
For baseline functions, the extension would be \int X_i(s) \beta(s, z_i) ds. This would be specified by bf(X, by=z). In theory we could work variable-domain functional terms into this framework: if z is a vector of domain widths, then this is the variable-domain model. The only difference is that the domain for these scenarios is "triangular". Perhaps this could be specified with the "limits" argument? bf(X, by=z, limits="vd") (where we interpret "vd" later).
P.S. - the need to allow varying-coefficient terms (both for scalar and functional predictors) came up in a project I'm working on with Rayman/Luo, so this isn't just me inventing features that will never be used/needed.
e.g., \beta(x) * z. I would like this to be specified by
p(z, by=x, linear=FALSE, tv=FALSE)
, similar tomgcv::s()
. Needs to check ifx
is continuous: if it is logical/factor, this would be fit more easily as an interaction usingx*z
in the formula.For baseline functions, the extension would be \int X_i(s) \beta(s, z_i) ds. This would be specified by
bf(X, by=z)
. In theory we could work variable-domain functional terms into this framework: ifz
is a vector of domain widths, then this is the variable-domain model. The only difference is that the domain for these scenarios is "triangular". Perhaps this could be specified with the "limits" argument?bf(X, by=z, limits="vd")
(where we interpret"vd"
later).P.S. - the need to allow varying-coefficient terms (both for scalar and functional predictors) came up in a project I'm working on with Rayman/Luo, so this isn't just me inventing features that will never be used/needed.