From: W. eWatson on
I don't see LSQ (linear least squares) as a solution for:

a = a0 + arctan((y-y0)/(x-x0))

where a0, x0, and y0 are unknowns,and x,y are a known collection of n
points.

There seems no way to linearize it as for something like y=e**ax to
loge(y) = ax.

A sinmple gradient method?
From: Rod on

"W. eWatson" <wolftracks(a)invalid.com> wrote in message
news:hu77q6$318$1(a)news.eternal-september.org...
>I don't see LSQ (linear least squares) as a solution for:
>
> a = a0 + arctan((y-y0)/(x-x0))
>
> where a0, x0, and y0 are unknowns,and x,y are a known collection of n
> points.
>
> There seems no way to linearize it as for something like y=e**ax to
> loge(y) = ax.
>
> A sinmple gradient method?


Is your question
Is least squares the appropriate method to calculate the unknowns?
Or is it that,
If you do least squares the equations you have to solve are not linear
and can't be made linear.
If it is the latter (which I suspect it is) then many software packakage
will be able to numerically solve the result equations including the Solve
add-in which comes with Excel.

If it is the former then you have to decide how the error term is
distributed and use maximum likelihood.


From: Ray Vickson on
On Jun 2, 8:33 pm, "W. eWatson" <wolftra...(a)invalid.com> wrote:
> I don't see LSQ (linear least squares) as a solution for:
>
> a = a0 + arctan((y-y0)/(x-x0))
>
> where a0, x0, and y0 are unknowns,and x,y are a known collection of n
> points.
>
> There seems no way to linearize it as for something like y=e**ax to
> loge(y) = ax.
>
> A sinmple gradient method?

This is a nonlinear least-squares problem; see
http://en.wikipedia.org/wiki/Non-linear_least_squares for an
explanation of methods and algorithms.

R.G. Vickson
From: Gerry on
On Jun 3, 5:33 am, "W. eWatson" <wolftra...(a)invalid.com> wrote:
> I don't see LSQ (linear least squares) as a solution for:
>
> a = a0 + arctan((y-y0)/(x-x0))
>
> where a0, x0, and y0 are unknowns,and x,y are a known collection of n
> points.
>
> There seems no way to linearize it as for something like y=e**ax to
> loge(y) = ax.
>
> A sinmple gradient method?

Hi

can you give us an example set of n data points?

From: W. eWatson on
On 6/2/2010 11:20 PM, Rod wrote:
> "W. eWatson"<wolftracks(a)invalid.com> wrote in message
> news:hu77q6$318$1(a)news.eternal-september.org...
>> I don't see LSQ (linear least squares) as a solution for:
>>
>> a = a0 + arctan((y-y0)/(x-x0))
>>
>> where a0, x0, and y0 are unknowns,and x,y are a known collection of n
>> points.
>>
>> There seems no way to linearize it as for something like y=e**ax to
>> loge(y) = ax.
>>
>> A sinmple gradient method?
>
>
> Is your question
> Is least squares the appropriate method to calculate the unknowns?
> Or is it that,
> If you do least squares the equations you have to solve are not linear
> and can't be made linear.
> If it is the latter (which I suspect it is) then many software packakage
> will be able to numerically solve the result equations including the Solve
> add-in which comes with Excel.
>
> If it is the former then you have to decide how the error term is
> distributed and use maximum likelihood.
>
>
Yes, it it the latter. Yes, linearization as in the exp example is not
really LSQ, but it's often not a bad place to start to get an estimate
for other techniques. That approach may be called curvilinear.

I had forgotten about Excel's math package. I might need it for
something else though.