As a tt()
term is an attempt to fit a functional form that isn't constant in time for a predictor's coefficient, it doesn't make sense to have multiple tt()
terms for the same predictor in the model. What you want is a single time-varying adjustment to what the predictor (without the extra time dependence) would provide.
In fact, R won't even let you do that. This quote from Section 5 of the time-dependence vignette answers your questions:
If there are multiple tt()
terms in the formula, then the tt
argument should be a list of functions with the requisite number of elements. One footnote to this, however, is that you cannot have a formula like log(bili) + tt(age) + tt(age)
. The reason is that the R formula parser removes redundant terms before the result even gets to the coxph
function.
You can specify different tt()
functions for different predictors in a list of functions, but I think that you have to have the order within the list in the same order as the tt()
terms appear in the formula. If the number of tt()
terms and the number of elements of the list of tt()
functions doesn't agree, the software might silently choose just the first element of the list.
As I understand it, a standard polynomial in a tt()
function won't result in separate coefficient estimates for each polynomial term. If you want a flexible fit for the time course, recent versions of the survival
package provide the nsk()
function that you can incorporate into a tt()
function to allow for a regression spline fit. See Section 4.2 of the vignette. That returns separate coefficients associated with spline terms: "the coefficients are the predicted values at knots 2, 3, . . . - the predicted value at knot 1."
Splines are much more reliable than standard polynomials for regression modeling, unless you have a strong theoretical reason for a particular polynomial form. I can't think of how you would have such a theoretical justification for a single polynomial for the time course of a Cox model's regression coefficient.