ddFixed

Auxiliary functions for fixed effects

Functions used in formula of ddhazard for time-invariant effects. ddFixed_intercept is only used for the intercept.

Usage
ddFixed(object)

ddFixed_intercept(n)

Arguments
object

Expression that would be used in formula. E.g. x or poly(x, degree = 3)

n

Number of rows in the data frame the data for estimation

Aliases
  • ddFixed
  • ddFixed_intercept
Examples
# 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)

Documentation reproduced from package dynamichazard, version 0.3.0, License: GPL-2

Community examples

Looks like there are no examples yet.