[R] nonlinear fitting on many voxels

From: Ayman Oweida <ajoweida_at_yahoo.com>
Date: Mon, 09 Jun 2008 12:33:09 -0700 (PDT)

After many months, I am now banging my head against the wall because I can't find a solution to this seemingly trivial problem.&nbsp; 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.&nbsp; I've tested the routine using simulated data and things went well.&nbsp; As for the real data, the fitting routine works variably.&nbsp; By variably, I mean the following: &nbsp; 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.&nbsp; NEVER was I able to get starting values that would allow the routine to run entirely!&nbsp; The error I would get after fitting the limited number of voxels is:&nbsp;

"Error in approx(x, fx, n = 2 * n.pts + 1) : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp; I've tried numerous nonlinear functions including: nlm, optim and nlminb, but all stop after performing the fit on a limited number of voxels.&nbsp; I took the values for which the fitting routine stops and I applied different starting values to them and it works!&nbsp; 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.&nbsp; any solutions?&nbsp; I am new to this complex world of statistical analysis. Your help is very very much appreciated.


Montreal Neurological Institute
Montreal, Canada

	[[alternative HTML version deleted]]

R-help_at_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. Received on Mon 09 Jun 2008 - 19:41:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 09 Jun 2008 - 20:31:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive