Re: [R] Numerical Derivatives in R

2006-03-14 Thread Martin Maechler
t;> jacobians, and Hessians. Please see the attached file >> for the code. I will be happy to help out with the >> development of a package and/or with the documentation >> process. >> >> Best, Ravi. >> >> >&

Re: [R] Numerical Derivatives in R

2006-03-13 Thread Spencer Graves
r with the documentation > process. > > Best, > Ravi. > > >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:r-help- >>[EMAIL PROTECTED] On Behalf Of Paul Gilbert >>Sent: Monday, March 13, 2006 12:09 PM >>To: r-help@stat.math.ethz.ch >>

Re: [R] Numerical Derivatives in R

2006-03-13 Thread Ravi Varadhan
age- > From: [EMAIL PROTECTED] [mailto:r-help- > [EMAIL PROTECTED] On Behalf Of Paul Gilbert > Sent: Monday, March 13, 2006 12:09 PM > To: r-help@stat.math.ethz.ch > Subject: Re: [R] Numerical Derivatives in R > > (This code looks vaguely familiar.) > > Is anyone int

Re: [R] Numerical Derivatives in R

2006-03-13 Thread Paul Gilbert
(This code looks vaguely familiar.) Is anyone interested in participating in an effort to make a self contained package for numerical derivatives? I would be happy to extract the Richardson extrapolation code for first and second derivatives from my package in the devel area of CRAN, but I'm a

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gray Calhoun
Ah, yes. I see your point. Apologies to all for the misinformation. --Gray On 12 Mar 2006 19:31:18 +0100, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > "Gray Calhoun" <[EMAIL PROTECTED]> writes: > > > Tolga, > > > > Look at numericDeriv. > > > > > arbfun <- function(x) x^2 > > > x <- 3 > > > nume

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gabor Grothendieck
Note that warning message. Its trying to evaluate qnorm outside of its allowable domain. On 3/12/06, Tolga Uzuner <[EMAIL PROTECTED]> wrote: > Actually, I did implement this using richardson extrapolation, but am > having trouble vectorising it. For some reason, it fails within integrate... > > A

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Actually, I did implement this using richardson extrapolation, but am having trouble vectorising it. For some reason, it fails within integrate... Anyone willing to look over the below and let me know what I am doing wrong, helps much appreciated. You can cut paste the below into the console..

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Peter Dalgaard
"Gray Calhoun" <[EMAIL PROTECTED]> writes: > Tolga, > > Look at numericDeriv. > > > arbfun <- function(x) x^2 > > x <- 3 > > numericDeriv(quote(arbfun(x)), "x") > [1] 9 > attr(,"gradient") > [,1] > [1,]6 However, numericDeriv is not particularly intelligent. It is effectively doing wha

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Thanks Gray, Tolga Gray Calhoun wrote: >Tolga, > >Look at numericDeriv. > > > >>arbfun <- function(x) x^2 >>x <- 3 >>numericDeriv(quote(arbfun(x)), "x") >> >> >[1] 9 >attr(,"gradient") > [,1] >[1,]6 > >--Gray > >On 3/12/06, Tolga Uzuner <[EMAIL PROTECTED]> wrote: > > >>Hi, >> >>Su

Re: [R] Numerical Derivatives in R

2006-03-12 Thread Gray Calhoun
Tolga, Look at numericDeriv. > arbfun <- function(x) x^2 > x <- 3 > numericDeriv(quote(arbfun(x)), "x") [1] 9 attr(,"gradient") [,1] [1,]6 --Gray On 3/12/06, Tolga Uzuner <[EMAIL PROTECTED]> wrote: > Hi, > > Suppose I have an arbitrary function: > > arbfun<-function(x) {...} > > Is the

[R] Numerical Derivatives in R

2006-03-12 Thread Tolga Uzuner
Hi, Suppose I have an arbitrary function: arbfun<-function(x) {...} Is there a robust implementation of a numerical derivative routine in R which I can use to take it's derivative ? Something a bit more than simple division by delta of the difference of evaluating the function at x and x+delt