-4

I can’t estimate standard error for parametri in maximum likelihood estimation. How could I do?

  • Please, add more informations: can you share the data you are working on? Did you make any attempt/test? If so, can you add them to the question? – Bruno Zamengo Feb 22 '20 at 12:56

1 Answers1

1

You have to evaluate the Hessian to estimate standard error for a parameter

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