Compute IPW weight
Calculates the IPW for a single group. Used by wght_matrix
to create a matrix of weights for each group and allocation scheme.
wght_calc(parameters, integrand, allocation, integrate_allocation = TRUE, ...)
parameters
: vector of parameter valuesintegrand
: function to pass to the argument 'f' of integrate
.allocation
: the allocation ratio for which to compute the weightintegrate_allocation
: Indicator of whether the integrand function uses the allocation parameter. Defaults to TRUE....
: other arguments passed to integrand.scalar result of the integral
If allocation
is an argument in the integrand function and integrate_allocation == TRUE
, then the weight is calcuated as:
Otherwise, the weight is computed by:
Useful links