Package 'ife'

Title: Autodiff for Influence Function Based Estimates
Description: Implements an S7 class for estimates based on influence functions, with forward mode automatic differentiation defined for standard arithmetic operations.
Authors: Nicholas Williams [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-1378-4831>)
Maintainer: Nicholas Williams <[email protected]>
License: GPL (>= 3)
Version: 0.2.4
Built: 2026-05-14 05:19:33 UTC
Source: https://github.com/nt-williams/ife

Help Index


Create a new 'influence_func_estimate' object

Description

Create a new 'influence_func_estimate' object

Usage

ife(
  x,
  eif,
  weights = rep(1, length(eif)),
  id = as.character(1:length(eif)),
  critical_value = qnorm(0.975)
)

influence_func_estimate(
  x,
  eif,
  weights = rep(1, length(eif)),
  id = as.character(1:length(eif)),
  critical_value = qnorm(0.975)
)

Arguments

x

[numeric(1)]
The estimate.

eif

[numeric(n)]
The influence function.

weights

[numeric(n)]
Optional sampling weights.

id

[character(n)]
Optional cluster identifiers.

critical_value

[numeric(1)]
Optional critical value for constructing confidence interval.

Value

An 'S7' object of class influence_func_estimate.

Examples

x <- influence_func_estimate(5, runif(10))
y <- ife(5, runif(10))
x + y
x + 1
1 - y
x / y
x * y
tidy(x)
# Example: Confidence interval for a variance estimate
x <- rnorm(100, 0, 2)
ife(mean(x^2), x^2 - mean(x^2)) - ife(mean(x), x - mean(x))^2