[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: mata code that calculates numerical partial derivates

From   KAI LIU <[email protected]>
To   [email protected]
Subject   st: mata code that calculates numerical partial derivates
Date   Tue, 12 Aug 2008 16:39:24 -0400

I am looking for mata code that will calculate numerical partial 
derivates of any given function, m(p) where p is a kx1 vector..

As a simple example consider the following transparent m(p) function

I am looking for a routine that will return

The only numerical gradients routine I can find is the Stata dydx 
command. This command, however, only gives derivatives of bivariate 
relationships. A more general Mata routine must exist since optimize 
uses numerical gradients to optimize f(p). It then returns the gradiants 
for the k optimized p’s, My application requires that I then evaluate 
the gradiants of another function of p (i.e. m(p)). 

Any help would be much appreciated.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index