Re: [R] getting variable length numerical gradient

2005-09-27 Thread Antonio, Fabio Di Narzo
bind(1, x1, x2)) > > > > ## The true Hessian > > solve(summary(fm)$cov.unscaled) > > > > > > I hope it helps. > > > > Best, > > Dimitris > > > > > > Dimitris Rizopoulos > > Ph.D. Student > > Biostatistical Centre >

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris, On Monday 26 September 2005 07:16, Dimitris Rizopoulos wrote: > Randall, > > thanks for your comments; however, you have to take into account what > is the purpose of the function here! The goal is to approximate > *partial* derivatives numerically, ... > > I hope it is more clear now.

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Dimitris Rizopoulos
t; <[EMAIL PROTECTED]> To: "R Help" Sent: Monday, September 26, 2005 3:53 PM Subject: Re: [R] getting variable length numerical gradient Dimitris, I'm new to R programming, and I'm trying to learn the proper way to do certain things. E.g., I had a piece of code w

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris, I'm new to R programming, and I'm trying to learn the proper way to do certain things. E.g., I had a piece of code with explicit iteration to apply some computations to a vector. It was pretty slow. I found a way to utilize R's built-in vectorization and it was sped up considerably.

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Antonio, Fabio Di Narzo
> I hope it helps. > > Best, > Dimitris > > > Dimitris Rizopoulos > Ph.D. Student > Biostatistical Centre > School of Public Health > Catholic University of Leuven > > Address: Kapucijnenvoer 35, Leuven, Belgium > Tel: +32/(0)16/336899 > Fax: +32/(0)16

Re: [R] getting variable length numerical gradient

2005-09-25 Thread Dimitris Rizopoulos
From: "Antonio, Fabio Di Narzo" <[EMAIL PROTECTED]> To: Sent: Sunday, September 25, 2005 11:37 AM Subject: [R] getting variable length numerical gradient > Hi all. > I have a numerical function f(x), with x being a vector of generic > size (say k=4), and I wanna take the nu

[R] getting variable length numerical gradient

2005-09-25 Thread Antonio, Fabio Di Narzo
Hi all. I have a numerical function f(x), with x being a vector of generic size (say k=4), and I wanna take the numerically computed gradient, using deriv or numericDeriv (or something else). My difficulties here are that in deriv and numericDeric the function is passed as an expression, and one h