truthG: truthG

View source: R/truthG.R

truthGR Documentation

truthG

Description

A function to generate an estimate of g0n and g1n that is equal to g00 and g10 plus an error term. The function is written for compatibility with the drinf.tmle function, i.e., as though it were a SuperLearner wrapper. If newX is two columns, returns g0n, if four columns, returns g1n.

Usage

truthG(Y, X, newX, family, obsWeights, b = 0.5, b0 = 1, r = -1/4,
  cons = 2, ...)

Arguments

Y

The outcome

X

The predictors

newX

The prediction frame

family

Not used, just for compatibility

obsWeights

Not used, just for compatibility

b

Interaction coefficient for L01 and L11

b0

The intercept

r

The exponent of the rate at which error goes to zero as function of n.

cons

The constant in front of the rate (default = 1)

Value

A list with predictions equal to truth + error


benkeser/drinf documentation built on Oct. 22, 2023, 9:50 a.m.