[R] Hessian matrix issue

2011-09-07 Thread Ravi Varadhan
Yes, numDeriv::hessian is very accurate. So, I normally take the output from the optimizer, *if it is a local optimum*, and then apply numDeriv::hessian to it. I, then, compute the standard errors from it. However, it is important to know that you have obtained a local optimum. In fact, you

Re: [R] Hessian matrix issue

2011-09-07 Thread Ravi Varadhan
However, it is not known whether the standard errors obtained from this Hessian are asymptotically valid. Let me rephrase this. I think that as a measure of dispersion, the standard error obtained using the augmented Lagrangian algorithm is correct. However, what is *not known* is the

Re: [R] Hessian Matrix Issue

2011-09-06 Thread Paul Hiemstra
On 09/03/2011 08:22 PM, dave fournier wrote: I wonder if your code is correct? I ran your script until an error was reported. the data set of 30 obs was [1] 0 0 1 3 3 3 4 4 4 4 5 5 5 5 5 7 7 7 7 7 7 8 9 10 11 [26] 12 12 12 15 16 I created a tiny AD Model Builder

Re: [R] Hessian matrix issue

2011-09-06 Thread Giovanni Petris
is to code the Hessian, but that is messy and tedious in most cases. Best, JN On 09/03/2011 06:00 AM, r-help-requ...@r-project.org wrote: Message: 59 Date: Fri, 2 Sep 2011 15:33:13 -0400 From: tzai...@alcor.concordia.ca To: r-help@r-project.org Subject: [R] Hessian Matrix Issue Message

Re: [R] Hessian Matrix Issue

2011-09-05 Thread Ben Bolker
Uwe Ligges ligges at statistik.tu-dortmund.de writes: I have not really looked into the details of the lengthy and almost unreadable code below. In any case, there are good reasons why numerics software typically uses Fisher scoring / IWLS in order to fit GLMs. And if your matrix is

Re: [R] Hessian Matrix Issue

2011-09-03 Thread Uwe Ligges
I have not really looked into the details of the lengthy and almost unreadable code below. In any case, there are good reasons why numerics software typically uses Fisher scoring / IWLS in order to fit GLMs. And if your matrix is that singular, even the common numerical tricks may not

Re: [R] Hessian matrix issue

2011-09-03 Thread John C Nash
Subject: [R] Hessian Matrix Issue Message-ID: e6dc43b4487eb4a4055e1ab485f015f0.squir...@webmail.concordia.ca Content-Type: text/plain;charset=iso-8859-1 Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d

Re: [R] Hessian Matrix Issue

2011-09-03 Thread dave fournier
I wonder if your code is correct? I ran your script until an error was reported. the data set of 30 obs was [1] 0 0 1 3 3 3 4 4 4 4 5 5 5 5 5 7 7 7 7 7 7 8 9 10 11 [26] 12 12 12 15 16 I created a tiny AD Model Builder program to do MLE on it. DATA_SECTION init_int

[R] Hessian Matrix Issue

2011-09-02 Thread tzaihra
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using optim method L-BFGS-B to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two