[R] Error singular gradient matrix at initial parameter estimates in nls

2011-06-30 Thread Niklaus Hurlimann
Greetings, I am struggling a bit with a non-linear regression. The problem is described below with the known values r and D inidcated. I tried to alter the start values but get always following error message: Error in nlsModel(formula, mf, start, wts): singular gradient matrix at initial

Re: [R] Fitting a half-ellipse curve

2010-09-30 Thread Niklaus Hurlimann
cbind(x=x, y=y) } So if your data were in a matrix or data.frame X... efit - fit.ellipse( X ) e - get.ellipse( efit ) plot(X) lines(e, col=red) Hope this helps, Michael On 29 September 2010 23:45, Niklaus Hurlimann niklaus.hurlim...@unil.ch wrote: Dear mailing list, I have following array

[R] Fitting a half-ellipse curve

2010-09-29 Thread Niklaus Hurlimann
Dear mailing list, I have following array: X2 Y2 [1,] 422.7900 6.0 [2,] 469.8007 10.5 [3,] 483.9428 11.0 [4,] 532.4917 25.5 [5,] 596.1942 33.5 [6,] 630.8496 40.5 [7,] 733.2996 45.0 [8,] 946.4779 32.0 [9,] 996.8068 35.5 [10,]

[R] plotting density in same plot in loop iteration

2010-05-29 Thread Niklaus Hurlimann
Hi R-mailing list I would have the following set-up below with a simplified data-frame. Through a loop which includes certain criteria for the densities I would like to plot the different density-distributions in the same plot. Of course I hope I don't do any mistakes with all the indexes of the

[R] simple loop iteration

2010-03-30 Thread Niklaus Hurlimann
Hi R mailing list, probably a very basic problem here, I try to do the following: Q-c(1,2,3) P-c(4,5,6) A- data.frame(Q,P) A Q P 1 1 4 2 2 5 3 3 6 this is my simplified data.frame (matrix) now I try to create following loop for subtraction of element within the data.frame: for(i in