jgellar / pcox

Penalized Cox regression models
1 stars 0 forks source link

The fixed-width, lag-based model #24

Open jgellar opened 9 years ago

jgellar commented 9 years ago

Some of my work with the historical Cox model has motivated fitting the following model to my data:

$\log h_i(t) = \log h0(t) + \int{t-\delta_0}^t X_i(s)\beta(s-t) ds$

Note that this model is not time-varying ($\beta$ is univariate). It means that at any time $t$, we are going to look at the last $\delta_0$ days, and use those observations as a functional predictor. Thus, we estimate a single, fixed-width coefficient function. I would like to fit the model when $\delta_0$ is small, say 3 days, 5 days, maybe at most 10 days.

There are practical limitations to fitting the model when the functional domain only takes a few unique values - you need to use a small basis set. e.g., when \delta_0 is 5, s-t can only take the values -5, -4, -3, -2, -1, or 0. I could use, e.g., b-splines of dimension at most 6 (or is it 5?). Another approach would be to not fit a basis to the coefficient function at all, but instead fit a model with 6 parameters, one for each value of s-t, and penalize the parameters directly (e.g., with a difference penalty). Do you have any intuition as to how this would compare to fitting a (small) basis to the 6 points?

pcox should be able to fit these models, but at this point I don't think it is able to do so. The first case I would just have to modify a couple things I think - right now I believe since the model is not time-varying, the model wouldn't be specified using a tt function, but it would have to be due to the integration limits and the domain transformation. This model could be specified by hf(X, s.transform="s-t", limits=l.fcn, bs="ps", k=5) for some appropriate l.fcn. The second would require more changes, because it's not even fitting a basis to the coefficient function, but it wouldn't be hard. Perhaps this could be specified by hf(X, s.transform="s-t", limtis=l.fcn, basistype="none")?

This of course is not an urgent feature to become part of the package, but I think it would be useful, and it since I need to fit the model I might as well put it in the package.