ma.vector(OLIN)
ma.vector()所属R语言包:OLIN
Calculation of moving average for a vector
移动平均线的计算方法为向量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This functions calculates the moving average for a vector.
此函数计算为向量的移动平均线。
用法----------Usage----------
ma.vector(A,M,av="median",delta=50)
参数----------Arguments----------
参数:A
vector of predictor to be used for sorting
预测的向量,可用于排序
参数:M
vector of variable to be averaged
平均变量的向量
参数:av
averaging by mean or median (default)
平均均值或中位数(默认)
参数:delta
even integer determining the size of the sliding window (2*delta+1.)
偶数确定的滑动窗口的大小(2*delta+1。)
Details
详情----------Details----------
The function ma.vector first sorts M according to the corresponding values of A. Subsequently, a moving average is calculated with window size (2*delta+1). The values for the moving average are set to zero if the corresponding window extends
功能ma.vector第一各种各样米,根据随后,移动平均线与窗口大小计算(2*delta+1)A的对应值。“均线的值设置为零,如果相应的窗口延伸
值----------Value----------
Vector with moving average values of M
向量移动平均值M
作者(S)----------Author(s)----------
Matthias E. Futschik,<a href="http://itb.biologie.hu-berlin.de/~futschik">http://itb.biologie.hu-berlin.de/~futschik</a>
参见----------See Also----------
ma.matrix
ma.matrix
举例----------Examples----------
### LOADING DATA[#加载数据]
data(sw)
A <- maA(sw[,1])
M <- maM(sw[,1])
# MA-PLOT [MA - 图]
plot(A,M)
# MOVING AVERAGE[移动平均线]
Mav <- ma.vector(A,M,av="median",delta=100)
points(A,Mav,col="red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|