jinseob2kim / jstable

Regression Tables from 'GLM', 'GEE', 'GLMM', 'Cox' and 'survey' Results.
https://jinseob2kim.github.io/jstable/
Apache License 2.0
23 stars 13 forks source link

sub-group analysis adjusted for other covariates #21

Closed ayueme closed 7 months ago

ayueme commented 8 months ago

Hello there, Sub-group analysis adjusted for other covariates is widely used in papers. For example, the figure 3 in this paper. image

The TableSubgroupxxx functions can only have one covariate. Just like the following:

# OK
TableSubgroupMultiCox(
  formula = Surv(time, status) ~ rx, # only 1 covariates is supported
  var_subgroups = c("sex","age","obstruct","perfor","adhere"), 
  data = df)

# NOT OK
TableSubgroupMultiCox(
  formula = Surv(time, status) ~ rx + bmi + smoke, # this not work
  var_subgroups = c("sex","age","obstruct","perfor","adhere"), 
  data = df)

So would you mind adding this feature? Thank you very much.

jinseob2kim commented 8 months ago

Please use var_cov option

ayueme commented 7 months ago

Thank you very much! I missed that important detail, sorry...