weightedShrink: Weighted shrinkage estimation.

Description Usage Arguments Value References

View source: R/weightedShrinkage.R

Description

Shrink values towards the mean (in the sample or the overall cohort) to an inverse degree to the confidence you assign to that observation.

Usage

1
weightedShrink(x, n, m = NULL, meanVal = NULL)

Arguments

x

Numeric vector of values to be shrunken towards the mean.

n

Numeric vector with corresponding entries to x, specifying the number of observations used to calculate x, or some other confidence weight to associate with x.

m

Number specifying weight of the shrinkage estimation, relative to the number of observations in the input vector n. Defaults to the minimum of n, but this is an arbitrary value and should be explored to find an optimal value for your use case.

meanVal

Number specifying the overall mean towards which the values should be shrunken. Defaults to NULL, in which case it is calculated as the (non-weighted) arithmetic mean of the values in the inputted vector x.

Value

A numeric vector with shrunken data values.

References

http://math.stackexchange.com/a/41513


bayesbio documentation built on May 2, 2019, 3:43 a.m.