Re: [R] very slow code execution

2019-02-09 Thread salah maadawy
thank you all for your suggestions and feedback, with further search and experimentation, the problem is with the auto.arima function with large k values, it takes 4 min to compute one model with k=30 and the time increases with K, so i used your suggestions for collecting the output but i limited

Re: [R] very slow code execution

2019-02-07 Thread Bob O'Hara
With 96k model fits it's going to be slow, so you might want to think first about whether you need to do them all. Beyond that, I think this is more in the R style, so might be quicker (I don't know how much the loops are slowing you down), and even if not it should be easier to adapt. The other t

Re: [R] very slow code execution

2019-02-07 Thread salah maadawy
Hi Micheal, Maybe there is a simple way but i wanted to get the lowest aicc ana i could not find a way to do so, that's why i created the table to store all possible outcomes and then i can easily get the minimum value and the values of (i,j and k) used for that minimum value. The first column in

Re: [R] very slow code execution

2019-02-07 Thread Michael Dewey
Well I do not know about data.table but in standard R if you go AICc[,1] <- 3 it fills the whole column with 3 so you will end up with a table with the last value of AICc stored in every row which is almost certainly not what you want. Michael On 06/02/2019 14:15, salah maadawy wrote: Hi Mich

Re: [R] very slow code execution

2019-02-06 Thread Jeff Newmiller
This seems like an odd analysis to me, but I don't have time to look closer at it. It certainly doesn't look simple to me... I hope you have some good theoretical guidance in tackling this (which this mailing list is not). One obvious thing is that z1 only depends on i, so you should only have

Re: [R] very slow code execution

2019-02-06 Thread Michael Dewey
This is not an answer to your speed problem but are your assignments to AICc[,1] and so on doing what you hope they are doing? Michael On 06/02/2019 12:03, salah maadawy wrote: i am a beginner regarding R but i am trying to do a simple thing, but it is taking too much time and i am asking if t

[R] very slow code execution

2019-02-06 Thread salah maadawy
i am a beginner regarding R but i am trying to do a simple thing, but it is taking too much time and i am asking if there is any way to achieve what i need, i have a time series data set with 730 data points, i detected 7, 354 and 365 seasonality periods. i am trying to use Fourier terms for season