找回密码
 注册
查看: 721|回复: 0

R语言 wq包 interpTs()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 23:05:45 | 显示全部楼层 |阅读模式
interpTs(wq)
interpTs()所属R语言包:wq

                                         Interpolate or substitute missing time series values
                                         内插或替代丢失的时间序列值

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Imterpolates or substitutes missing data in a time series for gaps up to a specified size.
Imterpolates或替代丢失的数据在一个时间序列的空白到指定的大小。


用法----------Usage----------


interpTs(x, type = c("linear", "series.median", "series.mean", "cycle.median",
  "cycle.mean"), gap = NULL)



参数----------Arguments----------

参数:x
object of class "ts" or "mts"  
对象的类"ts"或"mts"的


参数:type
method of interpolation or substitution  
内插方法或替代方法


参数:gap
maximum gap to be replaced  
要被替换的最大间隙


Details

详细信息----------Details----------

When type = "linear", the function performs linear interpolation of any NA runs of length smaller than or equal to gap. When gap = NULL, gaps of any size will be replaced. Does not change leading or trailing NA runs. This interpolation approach is best for periods of low biological activity when sampling is routinely suspended.
当type = "linear",函数执行线性插值的任何NA运行的长度小于或等于gap。当gap = NULL,任何规模的差距将被替换。不改变开头或结尾的NA运行。这种内插方法是最好的生物活性低,采样时经常暂停期间。

When type = "series.median" or "series.mean", missing values are replaced by the overall median or mean, respectively. This may be desirable when missing values are not allowed but one wants, for example, to avoid spurious enhancement of trends.
当type = "series.median"或"series.mean",遗漏值将被取代的整体中位数分别指。这可能是可取的,当遗漏值会被允许的,但一想,例如,以避免虚假增强的趋势。

When type = "cycle.median" or type = "cycle.mean", missing values are replaced by the median or mean, respectively, for the same cycle position (i.e., same month, quarter, etc., depending on the frequency). This may give more realistic series than using the overall mean or median.
当type = "cycle.median"或type = "cycle.mean",遗漏值的中位数或平均数,分别取代,在同一个周期的位置(即同月,季等,根据不同的频率)。这可能会更现实的系列比采用整体的平均数或中位数。

Intended for time series but first three types will work with any vector or matrix. Matrices will be interpolated by column.
适用于时间序列,但前三种类型将与任何向量或矩阵。矩阵的列,将插入。


值----------Value----------

The time series with some or all missing values replaced.
更换的部分或全部缺失值的时间序列。


参见----------See Also----------

decompTs
decompTs


实例----------Examples----------


### Interpolate a vector time series and highlight the imputed data[##插入一个向量时间序列和突出的估算数据]
chl27 <- sfbayChla[, 's27']
x1 <- interpTs(chl27, gap = 3)
plot(x1, col = 'red')
lines(chl27, col = 'blue')
x2 <- interpTs(chl27, type = "series.median", gap = 3)
plot(x2, col = 'red')
lines(chl27, col = 'blue')

### Interpolate a matrix time series and plot results[##插值矩阵的时间序列和图的结果]
x3 <- interpTs(sfbayChla, type = "cycle.mean", gap = 1)
plot(x3[, 1:10], main = "SF Bay Chl-a\n(gaps of 1 month replaced)")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-24 23:11 , Processed in 0.020107 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表