Skip to content

Errors when using subgroupAnalysis function #4

Description

@hhchang0210

Hi,

I got a problem when using subgroupAnalysis function.
The R code is:
`res.cox = coxph(Surv(discharge_death_365days_duration, discharge_death_365days==1)~
metformin+aki_stage+Age+gender+
HTN+CKD+CHF+LC+CVA+COPD+hyperlipidemia+IHD+
SOFA_score+heart_rate_mean+mbp_mean+resp_rate_mean+
spo2_mean+hemoglobin_mean+platelets_mean+wbc_mean+aniongap_mean+
bicarbonate_mean+bun_mean+chloride_mean+
creatinine_mean+sodium_mean+potassium_mean+
GCS+charlson_comorbidity_index+ward+
ethnicity+insurance_new+vasopressor, data=mydata_1)
res.cox

sub_cox_adj <- subgroupAnalysis(res.cox, mydata_1, treatment="metformin",
subgroups=c( "HTN" ) )`

The error message is:
Error in anova.coxphlist(object, test = test) :
models were not all fit to the same size of dataset
In addition: Warning message:
In anova.coxphlist(object, test = test) :
Models with response c(" 1)", " 1)") removed because response differs from model 1

How could I fix it?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions