moving-average Questions

2

Solved

zoo::rollmean is a helpful function that returns the rolling mean of a time series; for vector x of length n and window size k it returns the vector c(mean(x[1:k]), mean(x[2:(k+1)]), ..., mean(x[(n...
Luann asked 7/5, 2015 at 1:20

4

Solved

I am working with GPS data and trying to figure out how to average the 11th-15th fixes for latitude and longitude. I have seen solutions in similar questions for how to average every n rows. The pr...
Nabokov asked 2/4, 2015 at 3:49

3

Solved

I am looking for some performance gains in terms of rolling/sliding window functions in R. It is quite common task which can be used in any ordered observations data set. I would like to share some...
Escapade asked 26/1, 2014 at 19:36

1

Solved

I have the following dataset of incoming calls per day within the hours from 3 p.m. to 10 p.m. which looks like this: Date hour Count Year Month Day 01.01.2001 15 69 2001 1 1 01.01.2001 16 12 2001...
Crossgarnet asked 6/1, 2015 at 15:59

2

Solved

How to generate rolling mean with grouped data. Here's the data set.seed(31) dd<-matrix(sample(seq(1:20),30,replace=TRUE),ncol=3) Add a group identifier, and sort by group identifier du<-...
Crypt asked 20/11, 2014 at 16:21

3

Solved

I've got a vector and I want to calculate the moving average of it (using a window of width 5). For instance, if the vector in question is [1,2,3,4,5,6,7,8], then the first entry of the resultin...
Comstock asked 17/11, 2014 at 20:34

2

Solved

I am working with SQL Server 2008 R2, trying to calculate a moving average. For each record in my view, I would like to collect the values of the 250 previous records, and then calculate the averag...

2

Solved

I have a table of hourly product usage (how many times the product is used) data – ID (bigint)| ProductId (tinyint)| Date (int - YYYYMMDD) | Hour (tinyint)| UsageCount (int) #|1 | 20140901 | 0 | ...
Lover asked 18/9, 2014 at 21:8

1

Solved

I have a 2d numpy array. I want to take the average value of the n nearest entries to each entry, just like taking a sliding average over a one-dimensional array. What is the cleanest way to do thi...
Solidago asked 10/4, 2014 at 22:31

2

Solved

Hi I have a table that looks like this Date Customer Pageviews 2014/03/01 abc 5 2014/03/02 xyz 8 2014/03/03 abc 6 I want to get page view aggregates grouped by week but showing aggregates for pa...

4

Solved

I have a time series of stock prices and wish to compute the moving average over a ten minute window (see diagram below). As price ticks occur sporadically (i.e. they are not periodic) it seems fai...
Conspectus asked 14/4, 2012 at 21:35

1

Solved

I have a plot of time series in ggplot2 package and I have performed the Moving average and I would like to add the result of moving average to the plot of time series. Sample of Data-set (p31): ...
Scutch asked 12/12, 2012 at 13:21

2

I'm an R newbie and I'm having a lot of trouble doing something that is probably very simple. I have a big dataset split up into groups by country code, and I want to take a 3-month rolling average...
Albarran asked 10/3, 2012 at 6:42

4

Solved

I am trying to calculate the moving average of a signal. The signal value ( a double ) is updated at random times. I am looking for an efficient way to calculate it's time weighted average over a ...
Sheikdom asked 15/12, 2011 at 11:55

1

Solved

I would like to use the zoo function rollapply to apply a function (for example mean) on a time series but only using the last N known points. For example: x = zoo(c(1,2,3,4), order.by=c(10,11,12,...
Chlorpromazine asked 3/12, 2011 at 21:2

1

Solved

I want to filter the accelerometer values using a moving average, how is this done? Thanks
Bonds asked 16/2, 2010 at 11:36

3

Solved

Is there a pythonic way to build up a list that contains a running average of some function? After reading a fun little piece about Martians, black boxes, and the Cauchy distribution, I thought it...
Aharon asked 24/11, 2009 at 14:48

2

Solved

What's the most efficient way to create a moving average or rolling sum in R? How do you do the rolling function along with a "group by"?
Papaw asked 23/7, 2009 at 3:3

© 2022 - 2024 — McMap. All rights reserved.