varcov3: varcov3

Description Usage Arguments Author(s) References Examples

Description

Computes a sandwich type estimator for standard errors as descibed in Section 8.6.4 of Kloke and McKean (2014).

Usage

1
varcov3(eitbg, scores, v12inv, Dmat, p, delta, hparm)

Arguments

eitbg
scores
v12inv
Dmat
p
delta
hparm

Author(s)

Joseph W. McKean

References

Kloke and McKean (2014), Nonparametrics Using R, Boca Raton: Chapman-Hall.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (eitbg, scores, v12inv, Dmat, p, delta, hparm) 
{
    n <- length(eitbg)
    u <- (1:n)/(n + 1)
    sc <- getScores(scores, u)
    tauhat <- gettauF0(eitbg, p, scores, delta, hparm)
    veeinv <- v12inv %*% v12inv
    part1 <- t(Dmat) %*% veeinv %*% Dmat
    varcov3 <- (tauhat^2) * solve(part1)
    return(varcov3)
  }

kloke/rbgee documentation built on May 20, 2019, 12:34 p.m.