[R] Hessian matrix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[R] Hessian matrix

Arun.stat
Dear all R users,

Is there any way to calculate hessian matrix of a given function at any
given point?

Regards

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Hessian matrix

Prof Brian Ripley
?deriv  can do so algebraically for some functions.

There are various packages which can do so via finite differences, e.g.
fdHess() in nlme and hessian() in numDeriv.

On Wed, 1 Nov 2006, Arun Kumar Saha wrote:

> Dear all R users,
>
> Is there any way to calculate hessian matrix of a given function at any
> given point?
>
> Regards
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Please do: no HTML mail as requested.


--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Hessian matrix

Ravi Varadhan
The function "hessian" in the "numDeriv" package can be useful.  It is based
on Richardson extrapolation, and although it involves more computational
effort (depending on the order of the extrapolation), it will provide highly
accurate values.  

Ravi.

----------------------------------------------------------------------------
-------

Ravi Varadhan, Ph.D.

Assistant Professor, The Center on Aging and Health

Division of Geriatric Medicine and Gerontology

Johns Hopkins University

Ph: (410) 502-2619

Fax: (410) 614-9625

Email: [hidden email]

Webpage:  http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html

 

----------------------------------------------------------------------------
--------

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Prof Brian Ripley
Sent: Wednesday, November 01, 2006 3:13 AM
To: Arun Kumar Saha
Cc: [hidden email]
Subject: Re: [R] Hessian matrix

?deriv  can do so algebraically for some functions.

There are various packages which can do so via finite differences, e.g.
fdHess() in nlme and hessian() in numDeriv.

On Wed, 1 Nov 2006, Arun Kumar Saha wrote:

> Dear all R users,
>
> Is there any way to calculate hessian matrix of a given function at any
> given point?
>
> Regards
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Please do: no HTML mail as requested.


--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.