Description Usage Arguments Value References
View source: R/weightedShrinkage.R
Shrink values towards the mean (in the sample or the overall cohort) to an inverse degree to the confidence you assign to that observation.
1 | weightedShrink(x, n, m = NULL, meanVal = NULL)
|
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. |
A numeric vector with shrunken data values.
http://math.stackexchange.com/a/41513
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.