Essentially one needs to fitt two separate curves but with a common parameter. Also, one needs to recognize what sort of error structure might be involved. (It's not just about the regression parameters but also about the error structure.)
Suppose that the model generating the data is of the following form:
$$x = t \cos{(t+x)} + e_x$$
$$y = t \sin{(t+x)} + e_y$$
with $e_x$ and $e_y$ being independent with a common normal distribution having mean zero and standard deviation $\sigma$. The model that we fit will also be of this form.
First generate some data (not with a uniform distribution of errors):
spiral = t*{Cos[t + x], Sin[t + x]};
parameterToBeFound = x -> 0;
σ = 1;
numOfPoints = 100;
tMin = 2 Pi;
tMax = 6 Pi;
dataPoints = Table[{t, (spiral[[1]] /. parameterToBeFound) +
RandomVariate[NormalDistribution[0, σ], 1][[1]],
(spiral[[2]] /. parameterToBeFound) + RandomVariate[NormalDistribution[0, σ], 1][[1]]},
{t, tMin, tMax, (tMax - tMin)/(numOfPoints - 1)}];
Now we restructure the data so that we can use NonlinearModelFit
. We create two dummy variables to indicate which curve is being fit.
data = Flatten[Table[{{dataPoints[[i, 1]], 1, 0, dataPoints[[i, 2]]},
{dataPoints[[i, 1]], 0, 1, dataPoints[[i, 3]]}}, {i, numOfPoints}], 1];
Execute NonlinearModelFit
:
nlm = NonlinearModelFit[data, c t Cos[t + x] + s t Sin[t + x], x, {t, c, s}];
Show[ListPlot[dataPoints[[All, {2, 3}]]],
ParametricPlot[{nlm[t, 1, 0], nlm[t, 0, 1]}, {t, tMin, tMax}], AspectRatio -> 1]

If the errors for the two curves have different variances and/or are correlated, then something else needs to be used and the above might only be able to get one starting values for that other procedure.
t
values that created them, or just a set ofx
andy
coordinates? $\endgroup$