RE: [R] Numerical Derivative / Numerical Differentiation of unknownfunct ion

From: Ravi Varadhan <rvaradha_at_jhsph.edu>
Date: Sat 07 May 2005 - 06:02:51 EST


In general, any n-th order partial derivative can be approximated by forming the appropriate tensor product of n univariate approximations. If each univariate approximation is based on a two-point central difference (which involves 2 function evaluations), then the total number of function evaluations in the tensor product is 2^n. So, if you have a bivariate distribution, then its density is simply the second-order cross partial derivative, which can be evaluated accurately with 4 function evaluations. You can see that this problem quickly becomes non-trivial due to curse of dimensionality.

Hope this helps.

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: rvaradhan@jhmi.edu

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-
> bounces@stat.math.ethz.ch] On Behalf Of Cuvelier Etienne
> Sent: Friday, May 06, 2005 3:03 AM
> To: r-help@stat.math.ethz.ch
> Subject: Re: [R] Numerical Derivative / Numerical Differentiation of
> unknownfunct ion
>
> > > -----Original Message-----
> > > From: Berton Gunter [mailto:gunter.berton@gene.com]
> > > Sent: 05 May 2005 23:34
> > > To: 'Uzuner, Tolga'; r-help@stat.math.ethz.ch
> > > Subject: RE: [R] Numerical Derivative / Numerical Differentiation of
> > > unknown funct ion
> > >
> > >
> > > But...
> > >
> > > See ?numericDeriv which already does it via a C call and hence is much
> > > faster (and probably more accurate,too).
> > >
>
> Is there is a similar function to calculate the numerical value of the
> density of a given
> multivariable distribution?
> I have a function of a distribution H(x1, ...,xn) (not one of the known
> distributions),
> i.e. I can calculate a value of H for any (x1..., xn) .
> And I want to calculate h(x1...,xn) for any (x1...,xn) BUT I don't know
> the
> analytical
> expression of the density H.
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 07 06:46:17 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:37 EST