0
$\begingroup$

I've got data of x and y pairs and I'd like to fit it to a model that is parametrized as f = (x(t), y(t)). Unfortunately, there is no way for me to analytically solve for t and get a direct relationship between x and y to use the most common fitting methods. My x and y equations contain trig functions within them that make it hard to solve them together.

Is there any known method that is able to accomplish this? I've spent hours searching for something in either theory or python code but haven't seen any solution which makes me wonder if this is possible. My instinct was that maybe there is a way to do this using MCMC but I'm not really sure where to get started with that either.

Any advice is appreciated!

Edit: I can't show the data here but the functions are like x(t) = acos(bt) + ccos((d-b)*t + A) and y(t) = asin(bt) + csin((d-b)*t + B) where the lower case ones are parameters to fit and the capitals are just specific numbers I know already.

About good old least squares: I'm not sure whether it's fine to fit x(t) and y(t) separately versus t and then just put them together. And also, for my x and y data, I don't have any values of t corresponding to it. The data is a vector of (x, y) pairs. And my model only has a parametric form in terms of t for x and y.

$\endgroup$
7
  • $\begingroup$ Can you add more context? Show us your fnctions, a plot? Why cannot you use nonlinear least squres? $\endgroup$ Commented Jun 10 at 23:47
  • $\begingroup$ I can't show the data here but the functions are like x(t) = acos(bt) + ccos((d-b)*t + A) and y(t) = asin(bt) + csin((d-b)*t + B) where the lower case ones are parameters to fit and the capitals are just specific numbers I know already. $\endgroup$ Commented Jun 11 at 0:52
  • $\begingroup$ About the least squares: I'm not sure whether it's fine to fit x(t) and y(t) separately versus t and then just put them together. And also, for my x and y data, I don't have any values of t corresponding to it. The data is a vector of (x, y) pairs. And my model only has a parametric form in terms of t for x and y. $\endgroup$ Commented Jun 11 at 0:59
  • 1
    $\begingroup$ Does your model have error in just y? or in both x and y? (If it doesn't have error at all ... is this a statistical question?) $\endgroup$
    – Glen_b
    Commented Jun 11 at 3:06
  • 1
    $\begingroup$ Your model isn't even identifiable; but there is some chance of success if you at least know the correct sequence of the data pairs over time $t.$ The issue of whether to fit the coordinates separately or together depends on your statistical model of errors in the observations. These are two essential pieces of information we would need you to supply before we can provide relevant (correct) solutions. $\endgroup$
    – whuber
    Commented Jun 11 at 12:59

0