Function to make a static glm fit
static_glm(formula, data, by, max_T, ..., id, family = "logit", model = F,
weights, risk_obj = NULL, speedglm = F, only_coef = FALSE, mf)
Data frame or environment containing the outcome and co-variates
Length of each intervals that cases are binned into
The end time of the last bin
arguments passed to glm
or speedglm
. If only_coef = TRUE
then the arguments are passed to glm.control
if glm
is used
The id for each row in data
. This is important when variables are time varying
"logit"
or "exponential"
for the static equivalent model of ddhazard
TRUE
if you want to save the design matrix used in glm
weights if a skewed sample or similar is used
A pre-computed result from a get_risk_obj
. Will be used to skip some computations
TRUE
if speedglm
should be used.
TRUE
if only coefficients should be returned. This will only call the speedglm.wfit
or glm.fit
which will be faster.
model frame for regression. Needed when only_coef = TRUE
The returned list from the glm
call or just coefficients depending on the value of only_coef
Method to fit a static model corresponding to a ddhazard
fit. The method uses weights to ease the memory requirements. See get_survival_case_weights_and_data
for details on weights