One can do fits to complex data with FindFit by using a NormFunction for complex numbers.
However, NonlinearModelFit, doesn’t appear to have a NormFunction option. I’d like to have access to the extra functionality that FittedModel provides.
Does anyone know how I could get NonlinearModelFit to generalize the following FindFit example (this is a simple RC circuit impedance example):
fitModel = 1/(1/r + I c w);
noisyData = Table[{w, (fitModel + Random[Complex, {0, 0.1}] /. {r -> 2, c -> 1})}, {w, 0.01, 3, 0.05}]
FindFit[noisyData, fitmodel, {r, c}, w, NormFunction -> (Norm[Abs[#1^2]] &)]
Thanks, Craig