Calculate weights for each arm of a long data.frame
generate_ccw_calc_weights(
df,
event_times_df,
predvars,
stop_if_var_not_estimated = FALSE
)
Arguments
- df
the data.frame for a single arm
- event_times_df
the event times data.frame
- predvars
the baseline variables for adjustment
- stop_if_var_not_estimated
if TRUE, will error if a variable is dropped from the model.
Otherwise, will continue and omit the variable from the model. Default is FALSE.
Value
a data.frame with weight columns included