jgellar / pcox

Penalized Cox regression models
1 stars 0 forks source link

Allow varying-coefficient terms #28

Open jgellar opened 9 years ago

jgellar commented 9 years ago

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.

jgellar commented 9 years ago

P.S. - I'd like to do the same thing in refund for lf and af terms (I posted an issue about this over there awhile back)

jgellar commented 9 years ago

The to do has been moved to #30