g {GECal} | R Documentation |
Debiasing covariate for GECalib
Description
It returns the debiasing covariate, which is equivalent to the first order derivatie of
the generalized entropy G
.
Usage
g(x, entropy = NULL, del = NULL)
Arguments
x |
A vector of design weights |
entropy |
An optional data frame containing the variables in the model (specified by |
del |
The optional vector for threshold ( |
Value
A vector of debiasing covariate.
Examples
set.seed(11)
N = 10000
x = data.frame(x1 = rnorm(N, 2, 1), x2= runif(N, 0, 4))
pi = pt((-x[,1] / 2 - x[,2] / 2), 3);
pi = ifelse(pi >.7, .7, pi)
g_EL <- g(1 / pi, entropy = 1)
g_ET <- g(1 / pi, entropy = 0)
g_EL <- g(1 / pi, entropy = -1)
[Package GECal version 0.1.5 Index]