Re: [R] Problem with nls function

2015-11-16 Thread William Dunlap
Instead of giving nls() start=0.01, give it a named vector of parameters, start=c(theta=0.01). Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Nov 16, 2015 at 6:19 AM, roberto marrone wrote: > Dear all, > > I have a problem using the R finction nls. I am trying to perform an > optimisation

[R] Problem with nls function

2015-11-16 Thread roberto marrone
Dear all, I have a problem using the R finction nls. I am trying to perform an optimisation of the volatility parameter in the Black and Scholes formula. In the function nls I wrote as a formula the call option price with the only unknown parameter the volatility that I called theta. The code

Re: [R] problem with "nls" function

2010-01-27 Thread Carl Witthoft
From: hammadi jbeli Date: Tue, 26 Jan 2010 23:40:47 +0100 I have used R formulation style and I found this in some R documentations. Sorry, that makes no sense. I would recommend you go back to your original dataset and pick a very small subset of it--with only 2 variables, for example.

Re: [R] problem with "nls" function

2010-01-26 Thread hammadi jbeli
I have used R formulation style and I found this in some R documentations. On Tue, Jan 26, 2010 at 4:12 AM, Walmes Zeviani wrote: > > I supose you are following the SAS formulation style. R has a different > formulation style, such as: > > da <- expand.grid(A=factor(1:3), x=1:10) > da$y <- as.num

[R] Problem with "nls" function

2010-01-25 Thread hammadi jbeli
Dear R users, I have a response variable in a csv file called "y" and a matrix of predictor variables in a csv file called "mat". I have used the function "nls" I have specified the nonlinear relation between these variable.The code I have witten is called Rprog which begins with the phrase: L.mino

Re: [R] problem with "nls" function

2010-01-25 Thread Walmes Zeviani
I supose you are following the SAS formulation style. R has a different formulation style, such as: da <- expand.grid(A=factor(1:3), x=1:10) da$y <- as.numeric(da$A)*da$x/(1.2+da$x)+rnorm(da$x, 0, 0.1) m0 <- nls(y~Asym[A]*x/(Time[A]+x), data=da, start=list(Asym=c(1,2,3), Time=c(1,1,1))) summary(

[R] problem with "nls" function

2010-01-25 Thread hammadi jbeli
Dear R users, I have a response variable in a csv file called "y" and a matrix of predictor variables in a csv file called "mat". I have used the function "nls" I have specified the nonlinear relation between these variable.The code I have witten is called Rprog which begins with the phrase: L.mino