estimate_sandwich_matrices {geex} | R Documentation |
Estimate component matrices of the empirical sandwich covariance estimator
Description
For a given set of estimating equations computes the 'meat' (
in Stefanski and Boos notation) and 'bread' (
in Stefanski and
Boos notation) matrices necessary to compute the covariance matrix.
Usage
estimate_sandwich_matrices(.basis, .theta)
Arguments
.basis |
basis an object of class |
.theta |
vector of parameter estimates (i.e. estimated roots) |
Details
For a set of estimating equations (),
this function computes:
where all of the above are evaluated at . The partial derivatives in
numerically approximated by the function defined in
deriv_control
.
Note that and not
, and the same for
.
Value
a sandwich_components
object
References
Stefanski, L. A., & Boos, D. D. (2002). The calculus of m-estimation. The American Statistician, 56(1), 29-38.
Examples
myee <- function(data){
function(theta){
c(data$Y1 - theta[1],
(data$Y1 - theta[1])^2 - theta[2])
}
}
# Start with a basic basis
mybasis <- create_basis(
estFUN = myee,
data = geexex)
# Now estimate sandwich matrices
estimate_sandwich_matrices(
mybasis, c(mean(geexex$Y1), var(geexex$Y1)))
[Package geex version 1.1.1 Index]