static_glm

Function to make a static glm fit

Function to make a static glm fit

Usage
static_glm(formula, data, by, max_T, id, family = "logit", model = F, weights, risk_obj = NULL, ...)
Arguments
formula
coxph like formula with Surv(tstart, tstop, event) on the left hand site of ~
data
Data frame or environment containing the outcome and co-variates
by
Length of each intervals that cases are binned into
max_T
The end time of the last bin
id
The id for each row in data. This is important when variables are time varying
family
"logit" or "exponential" for the static equivalent model of ddhazard
model
TRUE if you want to save the design matrix used in glm
weights
weights if a skewed sample or similar is used
risk_obj
A pre-computed result from a get_risk_obj. Will be used to skip some computations
...
arguments passed to glm
Details

Method to fit a static model corresponding to a ddhazard fit. The method uses weights to ease the memory requirements. See get_survival_case_weigths_and_data for details on weights

Value

The returned list from the glm call

Aliases
  • static_glm
Documentation reproduced from package dynamichazard, version 0.1.0, License: GPL-2

Community examples

Looks like there are no examples yet.