Skip to contents

\(\hat F(t) = n^{-1}\sum 1\{Y_i - \hat\beta'Z_i \le t\}\) (Eq. 1.2, p. 4). The estimated parameter INSIDE the indicator is the point: if beta were known this would be an ordinary empirical df and Donsker's theorem would apply directly. Plugging in beta-hat adds a term to the limit, so \(\sqrt n(\hat F - F)\) is NOT the standard Brownian bridge and treating it as one gives wrong standard errors. Mirrors morie.fn.ksr021.

Usage

morie_residual_edf(y, z, beta, t = NULL)

Arguments

y

numeric responses.

z

covariates, vector or matrix.

beta

estimated coefficients.

t

evaluation points; the sorted residuals when NULL.

Value

list: t, F_hat, residuals, limit_is_brownian_bridge, correction_note, n, method.

References

Kosorok, Ch. 1, Eq. (1.2), p. 4.

Examples

set.seed(1)
z <- cbind(rnorm(50), rnorm(50))
morie_residual_edf(z %*% c(1, -0.5) + rnorm(50), z,
                   c(1, -0.5))$limit_is_brownian_bridge
#> [1] FALSE