Re: [R] regression methods for circular(?) data.

2005-09-27 Thread Ted Harding
I retract the siggestion I proposed last night -- it was based on a bad hunch! Sorry for wasting time. Best wishes, Ted. E-Mail: (Ted Harding) [EMAIL PROTECTED] Fax-to-email: +44 (0)870 094 0861 Date: 27-Sep-05

[R] regression methods for circular(?) data.

2005-09-26 Thread nwew
Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y - y+rnorm(100,mean=0,sd=0.1) y - y%%1 # --- modulo operation plot(x,y) and would like to recapture the slope (0.005) and intercept(0.2). I wonder if there are any clever algorithms to do this. I was

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 nwew wrote: Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y - y+rnorm(100,mean=0,sd=0.1) y - y%%1 # --- modulo operation plot(x,y) and would like to recapture the slope (0.005) and intercept(0.2). I wonder if there are any

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Witold Eryk Wolski
Hi, I do not know the intercept and slope. And you have to know them in order to do something like: ix-(y 0.9*(x-50)/200 I am right? cheers (Ted Harding) wrote: On 26-Sep-05 nwew wrote: Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y -

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 Witold Eryk Wolski wrote: Hi, I do not know the intercept and slope. And you have to know them in order to do something like: ix-(y 0.9*(x-50)/200 I am right? cheers Although I really knew them from the way you generated the data, I pretended I did not know them. Read

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Witold Eryk Wolski
Ted, I agree with you that if you unwrap the data you can use lm. And you can separate the data in the way you describe. However, if you have thousands of such datasets I do not want to do it by looking at the graph. Yes the scatter may be larger as in the example and range(y) may be larger

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 Witold Eryk Wolski wrote: Ted, I agree with you that if you unwrap the data you can use lm. And you can separate the data in the way you describe. However, if you have thousands of such datasets I do not want to do it by looking at the graph. Yes the scatter may be larger