No, that is not the way to do it.
An easy way is to use Num2Derivative after convergence. See the Introduction to
Ox (section 11.4, `Step 2: Analytical scores') for an example.
Jurgen
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
oxoxoxox 10th OxMetrics user conference 2011
oxoxoxox Maastricht University, Netherlands
oxoxoxox 1-2 September 2011
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
Dr Jurgen A Doornik
University of Oxford, Nuffield College, Oxford OX1 1NF
tel. UK: +44-1865-278610 fax +44-1865-278621
http://www.doornik.com
http://www.oxmetrics.net
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
On 2011-06-05 5:28, Ricardo Santos wrote:
> Hello Ox Users,
>
> I´m writing a code to estimate some parameters via MaxBFGS()and I just want to
> check if this is the correct procedure to obtain the standard erros:
>
> 1)For some &mHess, maximize via function MaxBFGS()until convergence. After
> convergence, the final output from the maximization will be the final
> quasi-Hessian matrix *K* (which, according to Ox Documentation, /is not a
> reliable as estimate of actual Hessian/)
>
> 2)Using the final matrix *K* as starting values for the mHess, repeat step 1
> until the convergence of the final quasi-Hessian matrix *K*.
>
> 3)After convergence of the *K* matrix in step 2, calculate the standard errors
> as vStdError = sqrt(diagonal(invert(mHess)));
>
> I´ve heard that in step 2, you should repeat the maximization process with the
> MaxNewton(), instead the MaxBFGS().
>
> Does anybody know anything about this?
>
> Thanks in advance.
>
> Best,
>
> Ricardo Santos
>
|