阅读背景:

R -滚动12个月的中位数与不一致的时间间隔。

来源:互联网 

I have data (values) collected over several years by numerous groups. I would like to calculate the 12 month rolling median (using the 12 previous months) for each group. I've looked into the zoo (and other) roll functions and they seem to all be fixed interval (eg 12 months = 12 rows), but the date intervals in my data are not consistent for each group. Data values were collected every month or every other month, but there are additional gaps as well. I guess I need a rolling median function that gathers values for the previous 364 days for each group. I'd appreciate some help!I have data (values) collected over several yea




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: