Skip to content

Fragile lookup of conf_int_row in get_cox_pairwise_df() #247

@jszczypinski

Description

@jszczypinski

conf_int_row lookup is fragile

conf_int_row <- paste0(arm, current_arm)
This constructs "armB" to index into coxph_ans$conf.int. But arm is the column name string (e.g., "arm"), not the variable name in the model. If the user's column is named "TRT01A", the row name would be "TRT01AXanomeline High Dose". This works, but only because coxph names coefficients as . If the formula has covariates (e.g., Surv(time, status) ~ arm + age), the conf.int matrix has multiple rows and the indexing still works because it's by row name. This is fine but worth a comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions