myee <- function(data){
function(theta){
c(data$Y1 - theta[1],
(data$Y1 - theta[1])^2 - theta[2])
}
}
mybasis <- create_basis(
estFUN = myee,
data = geexex)
mats <- estimate_sandwich_matrices(mybasis, .theta = c(5.04, 10.04))
correct_by(mats,
.correct_control = correction(fay_bias_correction, b = .75))
Run the code above in your browser using DataLab