Description Usage Arguments Details Value
View source: R/wght_functions.R
Calculates the IPW for a single group. Used by wght_matrix
to
create a matrix of weights for each group and allocation scheme.
1 |
parameters |
vector of parameter values |
integrand |
function to pass to the argument 'f' of |
allocation |
the allocation ratio for which to compute the weight |
integrate_allocation |
Indicator of whether the integrand function uses the allocation parameter. Defaults to TRUE. |
... |
other arguments passed to integrand. |
If allocation
is an argument in the integrand function and
integrate_allocation == TRUE
, then the weight is calcuated as:
1 / integrate(integrand)
Otherwise, the weight is computed by:
prod(allocation^A(1 - allocation)^A) / integrate(integrand)
scalar result of the integral
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.