[R] Scale time series in a way that 90% of the data is in the -0.-9/ +0.9 range

2011-05-12 Thread Mr.Q
Hello, How can i scale my time series in a way that 90% of the data is in the -0.-9/ +0.9 range? My approach is to first build a clean vector without those 10% far away from the mean require(outliers) y-rep(c(1,1,1,1,1,9),10) yc-y ycc-length(y)*0.1 for(j in 1:ycc) { cat(Remove,j)

Re: [R] Scale time series in a way that 90% of the data is in the -0.-9/ +0.9 range

2011-05-12 Thread Jerome Asselin
On Thu, 2011-05-12 at 06:40 -0700, Mr.Q wrote: Hello, How can i scale my time series in a way that 90% of the data is in the -0.-9/ +0.9 range? I have two methods to suggest. One that uses the ranks to scale, hence is nonparametric and will work with any data distribution. The other uses

[R] Scale time series in a way that 90% of the data is in the -0.-9/ +0.9 range

2011-05-10 Thread Mr Copper
Hello, please excuse my ignorance as i am new to R and this might seem trivial to you How can i scale my time series in a way that 90% of the data is in the -0.-9/ +0.9 range? I think i first have to select the 90% closest to the mean and then calculate my scaling parameter on it, then scale