g | R Documentation |
It returns the debiasing covariate, which is equivalent to the first order derivatie of
the generalized entropy G
.
g(x, entropy = NULL, del = NULL)
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 ( |
A vector of debiasing covariate.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.