Inspired by this previous question: Findfit doesn't give the good fit; Changing the starting values will not change the results.
Consider the following complex-valued dataset.
f[t_] := b + a/(c + t)
data = Table[f[t] /. {a -> -1 - I, b -> 1 + I, c -> -5 + 2 I}, {t, 1, 10}]
+ 0.1 RandomComplex[{-1 - I, 1 + I}, 10];
plot = ListPlot[Through@{Re, Im}@data]
Mathematica has no trouble fitting a linear model to it, and successfully finds complex values for the fit parameters.
g[t_] := u + v t;
lfit = FindFit[data, g[t], {u, v}, t]
(* {u -> 1.06445 + 1.59084 I, v -> -0.0604794 - 0.0647658 I} *)
Show[plot, Plot[Evaluate@Through@{Re, Im}@(g[t] /. lfit), {t, 1, 10}]]
It likewise has no trouble fitting the original nonlinear model to it if $c$ is held fixed.
fit = FindFit[data, f[t] /. c -> -5 + 2 I, {a, b}, t]
(* {a -> -1.00813 - 0.888072 I, b -> 0.960261 + 1.01034 I} *)
Show[plot, Plot[Evaluate@Through@{Re, Im}@(f[t] /. c -> -5 + 2 I /. fit), {t, 1, 10}]]
But make $c$ variable and suddenly it can't deal with complex numbers any more.
FindFit[data, f[t], {a, b, c}, t]
FindFit::nrlnum: The function value {0.318749 -1.36562 I,0.294047 -1.31665 I,0.306199 -1.5257 I,0.339789 -1.54803 I,<<3>>,0.59458 -1.00036 I,0.343269 -0.994435 I,0.400584 -0.92625 I} is not a list of real numbers with dimensions {10} at {a,b,c} = {1.,1.,1.}.
What gives?
FindFit
works in some cases but not in others, as Jens's answer here explains. $\endgroup$