g: Debiasing covariate for GECalib

View source: R/G.R

gR 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 formula).

del

The optional vector for threshold (\delta) when entropy == "PH".

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)


GECal documentation built on Aug. 8, 2025, 6:37 p.m.

Related to g in GECal...