[R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Veronesi, Fabio
Hi, I have a problem fitting the following Weibull Model to a set of data. The model is this one: a-b*exp(-c*x^d) If I fitted the model with CurveExpert I can find a very nice set of coefficients which create a curve very close to my data, but when I use the nls.lm function in R I can't obtain th

[R] Help with arguments in .Script

2009-12-19 Thread Veronesi, Fabio
Dear R users, my problem, at the moment, is the following: I need to apply a script to a very big dataset, so I need first to subdivide the dataset into samples and then apply the script to every single sample. Now I tried to solve the problem with these linest: S1<-data[data$sub==1,1:3]

[R] "R CMD BATCH" continue after an error in the script

2009-12-05 Thread Veronesi, Fabio
Hi, I have a problem with R CMD BATCH, because I created a .bat file to run a script: C:\R\R-2.9.2\bin\R CMD BATCH C:\Scrip_test.R It work perfectly but after 3 lines of script there is a line with a nls() function that cannot be fitted and this end in an error message. I'm not bother by the e

[R] Substitute "Object not found" with NA

2009-12-04 Thread Veronesi, Fabio
Hi everybody, I'm trying to create a script that picks a txt file with 2 columns of coordinates (depth and variable1) and automatically tries to fit several polynomial with the function nls(). After that, it creates a list of observed, predict, residuals and other, and then it calculates AIC, R