search for: runmad

Displaying 6 results from an estimated 6 matches for "runmad".

Did you mean: runmax
2004 Oct 08
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...ilar to SimpleMeanLoop above 3. apply(embed(x,k), 1, median) 4. mywinfun(x, k, FUN=median) - see above 5. rollFun (x, k, FUN=median) - fSeries package 6. running(x, fun=max, width=k) - gtools package Speeds: <0.01, 3.4, 9, 15, 29, 165 Mad over moving window can be done as follows: 1. runmad = function(x, k) { n = length(x) A = embed(x,k) A = abs(A - rep(apply(A, 1, median), k)) dim(A) = c(n-k+1, k) apply(A, 1, median) } 2. apply(embed(x,k), 1, mad) 3. mywinfun(x, k, FUN=mad) - see above 4. SimpleMadLoop(x, k) - similar to SimpleMeanLoop above...
2007 Feb 20
1
baseline fitters
...r Jarek Tuszynski says about relative speeds of various running-window functions: - runmin, runmax, runmean run at O(n) - runmean(..., alg="exact") can have worst case speed of O(n^2) for some small data vectors, but average case is still close to O(n). - runquantile and runmad run at O(n*k) - runmed - related R function runs at O(n*log(k)) The obvious alternative runmin() performs poorly due to dropout (zero- and low-value 'reverse-spikes') in the data. And runmed fits a baseline that, upon subtraction, obviously will send half the values into the negative,...
2005 Apr 02
1
Survey of "moving window" statistical functions - still looking f or fast mad function
...similar to SimpleMeanLoop above 3. apply(embed(x,k), 1, median) 4. mywinfun(x, k, FUN=median) - see above 5. rollFun (x, k, FUN=median) - fSeries package 6. running(x, fun=max, width=k) - gtools package Speeds: <0.01, 3.4, 9, 15, 29, 165 Mad over moving window can be done as follows: 1. runmad = function(x, k) { n = length(x) A = embed(x,k) A = abs(A - rep(apply(A, 1, median), k)) dim(A) = c(n-k+1, k) apply(A, 1, median) } 2. apply(embed(x,k), 1, mad) 3. mywinfun(x, k, FUN=mad) - see above 4. SimpleMadLoop(x, k) - similar to SimpleMeanLoop above 5. rollFun(x, k, FUN=mad) - fSeries pa...
2005 Sep 30
3
.C help
Hi, I am hoping some one can help me. I am learning to use C and would like to learn how to call c code in R. I have look at Writing R Extensions and I tried to copy the example on page 38 void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j <
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
...r than "caMassClass" and has fewer dependencies. Other changes include: - Adding to "caMassClass" support for reading and writing mzXML data - a standard for storing proteomics MS data. - Adding more error checking to 'runmean', 'runmin', 'runmax', 'runmad' & 'runquantile' functions - Writing 3 new functions for round-off-error free sumation: 'sum.exact', 'cumsum.exact' and 'runsum.exact'. - Added option to "runmean" function to allow use of above round-off-error free computation Jarek =============...
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
...r than "caMassClass" and has fewer dependencies. Other changes include: - Adding to "caMassClass" support for reading and writing mzXML data - a standard for storing proteomics MS data. - Adding more error checking to 'runmean', 'runmin', 'runmax', 'runmad' & 'runquantile' functions - Writing 3 new functions for round-off-error free sumation: 'sum.exact', 'cumsum.exact' and 'runsum.exact'. - Added option to "runmean" function to allow use of above round-off-error free computation Jarek =============...