Re: [R] Difference between two time series

2011-11-21 Thread R. Michael Weylandt
As I said before: please dput() some working data and I'll try to work something up. Without it, the only thing I can reasonably suggest is that perhaps you are looking for the window() function to be applied before min/max. Something like: X - ts(1:48, start = 1, frequency = 4) Y - ts(1:12,

Re: [R] Difference between two time series

2011-11-17 Thread Sarwarul Chy
Hello Michael, Thanks again for your reply. Actually, I am working with wind data. I have some sample data for actual load. scan(/home/sam/Desktop/tt.dat) -tt ## This is the input for the actual output of the generation t = ts(tt, start=8, end=24, frequency=1,) I have another random sequence

Re: [R] Difference between two time series

2011-11-15 Thread Sarwarul Chy
Hello, Can you please help me with this? I am also stack in the same problem. Sam -- View this message in context: http://r.789695.n4.nabble.com/Difference-between-two-time-series-tp819843p4073800.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Difference between two time series

2011-11-15 Thread R. Michael Weylandt
It's not clear what it means for the differences to be of increasing order but if you simply mean the differences are increasing, perhaps something like this will work: library(caTools) X = cumsum( 2*(runif(5e4) 0.5) - 1) # Create a random Walk Y = runmean(X, 30, endrule = mean, align = right)

Re: [R] Difference between two time series

2011-11-15 Thread Sarwarul Chy
Hello Michael, Thanks for your reply. What I want to do is something like this? For example, I have a continuous time series y=x(t), and another discrete time series z=w(t). Xdiff(i)=Max. difference between x(t) and w(t) in interval i Ndiff(i)=Min. difference between x(t) and w(t) in interval

Re: [R] Difference between two time series

2011-11-15 Thread R. Michael Weylandt
Can you post working examples of your data using the dput() function? There are so many types of time series in R and so many different things you could mean that it's just easier to work with real data. Michael On Tue, Nov 15, 2011 at 4:28 PM, Sarwarul Chy sarwar.sha...@gmail.com wrote: Hello