-4

我无法估计最大似然估计中参数的标准误差。我该怎么办?

4

1 回答 1

1

您必须评估 Hessian 来估计参数的标准误差

fit = optim(start.theta, fn = function,    #start.theta initial value of paramter
                    hessian = TRUE, method = "L-BFGS-B",     #hessian True to calculate Hessian matrix
                    lower = c(), 
                    upper = c(),
                    control = list(trace = 1, fnscale = -1))  #fnscale= -1 to maximize the function



        theta.hat = fit$par                 #parameter estimate
        sd.hat = sqrt(diag(solve(fit$hessian/(n-1))))  #se estimate
           # you could use also optimHess to evaluate the Hessian

于 2020-02-22T09:41:02.453 回答