subgroups: Function to perform subgroups (effect estimate) analysis

View source: R/subgroups.R

subgroupsR Documentation

Function to perform subgroups (effect estimate) analysis

Description

function to perform subgroups analysis given minimal amout of infos. It should produce a table suitable for forest plotting.

Usage

subgroups(
  ep,
  factors_df = NULL,
  subgroups_df = NULL,
  factors_lab = names(factors_df),
  subgroups_lab = names(subgroups_df),
  ...
)

Arguments

ep

end point (quantitative, factor or Surv). Estimates with lm for quantitative, glm for binomial factor, coxph for Surv

factors_df

a data.frame with main estimate factors (eg in a trial could be a 1 column with treatment variable)

subgroups_df

data.frame of factor for subsetting and interaction test

factors_lab

label for the main factor under study (eg Treatment in a RCT)

subgroups_lab

label for the subgroup (eg could by Histology, Age class and so on)


lbraglia/lbstat documentation built on Sept. 17, 2023, 2:30 p.m.