append_weights: Append argument list with calculated weights as frequency

Description Usage Arguments Value Author(s)

Description

emmeans expects accepts a weights argument to specify the denominator for mean calculations. This function will calculate these weights from the frequency of the emmeans levels from a new dataset.

Arguments with which emmeans is to be called are passed to this function which will call emmeanss() with weights = 'show.levels' in order to determine the levels over which weights are calculated. It will then use the passed data to evaluate frequencies for those weights.

Usage

1
append_weights(emmeans_args, data = NULL, verbose = FALSE)

Arguments

emmeans_args

arguments with which emmeans will be called

data

a dataset over which the weights should be calculated as level frequencies.

verbose

whether additional information should be printed to console

Value

The same arguments passed through emmeans_args with the weights parameter specified by the frequencies of occurence in the data variable, or the emmeans_args$data list item if no data was included (default behavior of emmeans).

Author(s)

Doug Kelkhoff [email protected]


lengning/gClinBiomarker documentation built on May 9, 2019, 2:55 p.m.