This is an internal helper to extract the correct LS mean estimates and contrast for a specific visit and treatment arm relative to the reference arm for one MMRM subgroup.
h_mmrm_subgroup_df(
lsmeans,
overall_fit,
is_in_subset,
visit,
treatment_arm,
subgroup,
var,
label
)List with estimates (with 2 rows) and contrasts (with 1 row) in the
format needed in extract_mmrm_subgroups().
(named list or NULL)
LS mean estimates from fit_mmrm()
on this subgroup.
(tern_mmrm)
result of fit_mmrm() on overall data.
(logical)
specifying which row from the overall data
should be used for this subset.
(string)
which visit to extract.
(string)
which treatment arm to extract.
(string)
for labeling in the resulting data.frame.
(string)
specifies which variable was used to derive the subset,
if ALL then this means the overall data was used.
(string)
variable label.