Closed Shaunson26 closed 7 months ago
First: this is a bug in the code. I'll replace with (id).
Second: When R creates a variable name of its own the general rule is to add () around it. The obvious place we see this is with (Intercept) in the linear model. The same happens with model.frame for variables that are not in the formula, such as weights, etastart in glm, id in coxph and brier, etc. I suspect that the lack of () in model.extract was originally for backwards compatability with S
Third: I'm knee deep in a change to survfit, so this may wait to be bundled with that. (I'm not versed in multiple branches).
Now fixed in the latest release
In examining the
brier()
function with start-stop data, there seems to be an issue withmodel.extract()
and the column named"(id)"
. It appearsmodel.extract()
ignores the brackets in column names? Thus to select the column"(id)"
, one only needs to usemodel.extract(frame, "id")
. Is this expected?