lsmeans_helpers {tern.mmrm}R Documentation

Helpers for Processing Least Square Means

Description

Helpers for Processing Least Square Means

Usage

h_get_emmeans_res(fit, vars, weights)

h_get_average_visit_specs(emmeans_res, vars, averages, fit)

h_get_spec_visit_estimates(emmeans_res, specs, conf_level, tests = FALSE)

h_get_single_visit_estimates(emmeans_res, conf_level)

h_get_relative_reduc_df(estimates, vars)

h_single_visit_contrast_specs(emmeans_res, vars)

h_average_visit_contrast_specs(specs, averages)

Arguments

fit

result of mmrm::mmrm().

vars

(named list of string or character)
specifying the variables in the MMRM. The following elements need to be included as character vectors and match corresponding columns in data:

  • response: the response variable.

  • covariates: the additional covariate terms (might also include interactions).

  • id: the subject ID variable.

  • arm: the treatment group variable (factor).

  • visit: the visit variable (factor).

  • weights: optional weights variable (if NULL or omitted then no weights will be used).

Note that the main effects and interaction of arm and visit are by default included in the model.

weights

(string)
argument from emmeans::emmeans(), "proportional" by default.

emmeans_res

(list)
initial emmeans result from h_get_emmeans_res().

averages

(list)
optional named list of visit levels which should be averaged and reported along side the single visits.

specs

(list)
list of least square means specifications, with elements coefs (coefficient list) and grid (corresponding data.frame).

conf_level

(proportion)
confidence level of the interval.

tests

(flag)
whether to add test results to the estimates.

estimates

(data.frame)
single visit least square mean estimates.

Functions


[Package tern.mmrm version 0.3.0 Index]