# All these call with give the same result where
# 'data' is a hypothetical data frame. We can get a
# time-invariant estimate for x1 by:
ddhazard(Surv(stop, event) ~ ddFixed(x1), data)
# All of the calls below will yield the same result
# with a time-invariant intercept:
ddhazard(Surv(stop, event)
~ ddFixed(1) + x1, data)
ddhazard(Surv(stop, event)
~ -1 + ddFixed(1) + x1, data)
ddhazard(Surv(stop, event)
~ ddFixed(rep(1, nrow(data))) + x1, data)
ddhazard(Surv(stop, event)
~ -1 + ddFixed(rep(1, nrow(data))) + x1, data)
ddhazard(Surv(stop, event)
~ ddFixed_intercept(nrow(data)) + x1, data)
ddhazard(Surv(stop, event)
~ -1 + ddFixed_intercept(nrow(data)) + x1, data)
Run the code above in your browser using DataCamp Workspace