*Post by pierre Lenck-Santini*Hi,

let's say you have circular-linear data (distance of a measure vs

phase of a signal).

How do you establish the relationship between the two variables? I

already computed the circular-linear correlation coefficient (based

on Mardia's work). But I would like to compute the slope of the

regression line.

There must be an algorhythm out there

any one knows?

I don't use R but they have this function.

------------------------

It seems to me that, instead of looking for a line of regression, you

should be looking for a plane of regression; that is, a best-fitting plane

for linear data against data restricted to vectors on the unit circle. In

other words, if t is a vector of angular data, 0 to 2*pi, and s is a

corresponding vector of linear data, you would want to choose constants a,

b, and c so as to minimize the quantity

sum((a*cos(t)+b*sin(t)+c-s).^2).

That leads to a standard linear least squares problem using the arrays

A = [mean(cos(t).^2),mean(cos(t).*sin(t)),mean(cos(t)); ...

mean(cos(t).*sin(t)),mean(sin(t).^2),mean(sin(t));

mean(cos(t)),mean(sin(t),1];

u = [mean(cos(t).*s);mean(sin(t).*s);mean(s)];

where you wish to solve A*x = u. Its solution is given by

x = A\u;

The three coefficients will be a = x(1), b = x(2), and c = x(3). Your

best-fitting plane to the s and t data would then have the equation

s2 = a*cos(t) + b*sin(t) + c

Of course, this plane will have a direction of maximum gradient

determined by the coefficients a and b, and a line in the plane along that

direction could be considered a line of regression. However, it requires

some approach such as the above to determine that best direction.

Roger Stafford