##---- 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 (object, fun, ...)
{
coef <- coef(object)
est <- fun(coef, ...)
Sigma <- vcov(object)
gd <- grad(fun, coef, ...)
se.est <- as.vector(sqrt(colSums(gd * (Sigma %*% gd))))
data.frame(Estimate = est, SE = se.est)
}
Run the code above in your browser using DataLab