# NOT RUN {
# Variance of the maximum likelihood estimator for mu parameter in
# gaussian data
loglik <- function(series, x, sd = 1) {
-sum(log(dnorm(series, mean = x, sd = sd)))
}
sqrt(c(var(malleco) / length(malleco), diag(solve(hessian(
f = loglik, x = mean(malleco), series = malleco,
sd = sd(malleco)
)))))
# }
Run the code above in your browser using DataLab