View source: R/globalweights.R
globalweights_diff | R Documentation |
Global Weights Based on Response Rate Differences
globalweights_diff(n, r, eps_global = 1, w = 1)
n |
The sample size per basket. |
r |
Vector of responses. |
eps_global |
A tuning parameter that determines the amount of borrowing. A higher value leads to a smaller weight and therefore less borrowing when the heterogeneity between the results in the baskets increases. |
w |
A fixed probability between 0 and 1. |
globalweights_diff
calculates a weight based on the
heterogeneity of the response rates of all baskets that is multiplied
to the pairwise weights calculated with the function that is passed to
weight_fun
. The weight is 1 when the number of responses is identical
in all baskets and 0 if the response rates are an equidistant sequence
from 0 to 1. If the maximum weight should be smaller than 1, w
can be set to a smaller value.
A numeric value.
globalweights_diff(n = 20, r = c(1, 3, 5), eps_global = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.