# fay_df_correction: Correct sandwich variance inference by Fay's degrees of... In geex: An API for M-Estimation

## Description

Computes the degrees of freedom correction described in Fay and Graubard (2001). See `vignette("05_finite_sample_corrections", package = "geex")` for further information.

## Usage

 `1` ```fay_df_correction(components, b = 0.75, L, version) ```

## Arguments

 `components` an object of class `sandwich_components` `b` a numeric value < 1. Defaults to 0.75 as in Fay. `L` a k x p matrix where p is the dimension of theta `version` either 1 or 2, corresponding to hat(d) or tilde(d), respectively

## Value

a scalar corresponding to the estimated degrees of freedom

## References

Fay, M. P., & Graubard, B. I. (2001). Small-Sample adjustments for Wald-type tests using sandwich estimators. Biometrics, 57(4), 1198-1206

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20``` ```# This example demonstrates usage of the corrections, not a meaningful application myee <- function(data){ function(theta){ c(data\$Y1 - theta[1], (data\$Y1 - theta[1])^2 - theta[2]) } } results <- m_estimate( estFUN = myee, data = geexex, root_control = setup_root_control(start = c(1,1)), corrections = list( df_correction1 = correction(fay_df_correction, b = .75, L = c(0, 1), version = 1 ), df_correction2 = correction(fay_df_correction, b = .75, L = c(0, 1), version = 2 )) ) get_corrections(results) ```

geex documentation built on Sept. 24, 2018, 1:04 a.m.