Re: [R] optim function multi variables -newbie

2011-01-28 Thread michalseneca
I tried to modify the code,thanks for noticing...now i get that the function cannot be evaluated at initial parameters.However I do not know what does that mean..Should I try to modify parameters. I am still not sure of syntax of function. I cannot get that optimize work correctly. I am trying to

Re: [R] optim function multi variables -newbie

2011-01-28 Thread Hans W Borchers
michalseneca michalseneca at gmail.com writes: I tried to modify the code,thanks for noticing... now i get that the function cannot be evaluated at initial parameters. However I do not know what does that mean.. Should I try to modify parameters. I am still not sure of syntax of function. I

[R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y-C(0.2,0.5,0.6) where params-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it ..however if i use syntax optim(params ,

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Uwe Ligges
On 27.01.2011 14:08, michalseneca wrote: Hi , can i ask if somebody know the syntax for optim function with multiple variables: I have function f (params,y,g,h,j) returnig z y-C(0.2,0.5,0.6) where params-c(x1,x2) I define g,h,j and then I define params, then use optim to structure it

Re: [R] optim function multi variables -newbie

2011-01-27 Thread michalseneca
Hi, Basically what I am trying is to rewrite matlab code into R ...This is code for famous SABR model Calibration. I did most of the code up to optimalization issue. In the attachment you can find matlab and my unfinished R code..This is very helpful code...Basically I am trying to achieve the

Re: [R] optim function multi variables -newbie

2011-01-27 Thread Hans W Borchers
michalseneca michalseneca at gmail.com writes: Hi, Basically what I am trying is to rewrite matlab code into R ...This is code for famous SABR model Calibration. I did most of the code up to optimalization issue. In the attachment you can find matlab and my unfinished R code..This is very