[R] Zero rows/cols in the hessian matrix

Timur Elzhov Timur.Elzhov at jinr.ru
Mon Feb 10 17:04:03 CET 2003

Dear R experts!

I try to minimize a function with external C fitting function.
I get the hessian matrix. Here it is:

            [,1] [,2]      [,3] [,4]
  [1,] 1.8816631    0 0.8859803    0
  [2,] 0.0000000    0 0.0000000    0
  [3,] 0.8859803    0 0.4859983    0
  [4,] 0.0000000    0 0.0000000    0

Second and fourth rows/columns have zero values only. That's OK,
because that ones related to parameters were not included in fitting
expression (but *were* passed to minimization function as arguments),
so dF/dp == 0 for them.  It of course doesn't make sense to calculate
the standard errors for the mentioned "fitting-independent"
parameters, but I want to do that for others! I read in R-intro, that
I have to calculate the inverse of hessian at first.
solve(hessian) logs:

  Error in solve.default(hessian) : singular matrix `a' in solve

So, the question is:
  How can I calculate the errors of remaining parameters (without
  removing "fitting-independent" parameters from arguments)?



More information about the R-help mailing list