[R] Numerical Derivative / Numerical Differentiation of unknownfunct ion
Ravi Varadhan
rvaradha at jhsph.edu
Fri May 6 22:02:51 CEST 2005
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 at jhmi.edu
--------------------------------------------------------------------------
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-
> bounces at stat.math.ethz.ch] On Behalf Of Cuvelier Etienne
> Sent: Friday, May 06, 2005 3:03 AM
> To: r-help at stat.math.ethz.ch
> Subject: Re: [R] Numerical Derivative / Numerical Differentiation of
> unknownfunct ion
>
> > > -----Original Message-----
> > > From: Berton Gunter [mailto:gunter.berton at gene.com]
> > > Sent: 05 May 2005 23:34
> > > To: 'Uzuner, Tolga'; r-help at 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 at 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
More information about the R-help
mailing list