After many months, I am now banging my head against the wall because I can't find a solution to this seemingly trivial problem. Any help would be appreciated:
I am trying to apply a nonlinear fitting routine to a 3D MR image on a voxel-by-voxel basis. I've tested the routine using simulated data and things went well. As for the real data, the fitting routine works variably. By variably, I mean the following: with a specific set of starting parameters the routine would work for the first 10 voxels, for another set of starting values the routine would work for the first 1000 voxels and so on. NEVER was I able to get starting values that would allow the routine to run entirely! The error I would get after fitting the limited number of voxels is: "Error in approx(x, fx, n = 2 * n.pts + 1) : need at least two non-NA values to interpolate" I think the error is from the library Bolstad since I'm using the sintegral function as part of the fitting equation. I've tried numerous nonlinear functions including: nlm, optim and nlminb, but all stop after performing the fit on a limited number of voxels. I took the values for which the fitting routine stops and I applied different starting values to them and it works! I'm still using the same voxel/parameter values and I am sure they are not NA values as per the error! Ok, I think the problem is clear. any solutions? I am new to this complex world of statistical analysis. Your help is very very much appreciated. Thanks, Ayman Montreal Neurological Institute Montreal, Canada [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.