decompTs(wq)
decompTs()所属R语言包:wq
Decompose a time series
分解时间序列
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function decomposes a time series into a long-term mean, annual, seasonal and "events" component. The decomposition can be multiplicative or additive.
函数时间序列分解成一个术语平均值,年,季,“事件”成分。分解可以是乘法或添加剂。
用法----------Usage----------
decompTs(x, startyr, endyr, event = TRUE, type = c("mult", "add"))
参数----------Arguments----------
参数:x
a monthly time series vector
一个月度时间序列向量
参数:startyr
the desired starting year for the analysis
分析所需的开始的一年
参数:endyr
the ending year
结束一年
参数:event
whether or not an "events" component should be determined
一个“事件”的组成部分,应确定是否
参数:type
the kind of decomposition, either multiplicative ("mult") or additive ("add")
什么样的分解,无论是乘(“多个”)或添加剂(“添加”)
Details
详细信息----------Details----------
The rationale for this simple approach to decomposing a time series, with examples of its application, is given by Cloern and Jassby (2010). It is motivated by the observation that many important events for estuaries (e.g., persistent dry periods, species invasions) start or stop suddenly. Smoothing to extract the annualized term, which can disguise the timing of these events and make analysis of them unnecessarily difficult, is not used.
理由为这个简单的时间序列分解,其应用的例子,是由Cloern和Jassby(2010年)。它的动机,观察到河口的许多重要事件(例如,持续的干旱期,物种入侵)突然启动或停止。平滑提取的年度内,它可以掩盖这些事件,并分析他们不必要的困难,不使用的时间。
A multiplicative decomposition will typically be useful for a biological community- or population-related variable (e.g., chlorophyll-a) that experiences exponential changes in time and is approximately lognormal, whereas an additive decomposition is more suitable for a normal variable. Aside from the long-term mean, each component of a multiplicative decomposition will average 1, whereas each component of an additive decomposition will average 0.
一个乘法分解通常会是有用的生物社区或人口有关的变量(例如,叶绿素-a)经历指数变化的时间,大约是对数正态分布的,而添加剂分解是更适合于一个正常的变量。除了从术语平均值,每个分量乘法分解将平均1,而每个组件的添加剂分解将平均0。
If event = TRUE, the seasonal component represents a recurring monthly pattern and the events component a residual series. Otherwise, the seasonal component becomes the residual series. The latter is appropriate when seasonal patterns change systematically over time. You can use plotSeason and seasonTrend to investigate the way seasonality changes.
如果event = TRUE,季节性分量代表每月定期模式和事件成分的残差序列。否则,季节分量变的残差序列。季节性模式的改变时,系统随着时间的推移,后者是适当的。你可以用plotSeason和seasonTrend调查的方式季节性变化。
值----------Value----------
A monthly time series matrix with the following individual time series:
每月一次的系列矩阵的个别时间序列:
参数:original
original time series
原来的时间序列
参数:grandmean
constant series equal to the long-term mean
恒定系列等于术语平均
参数:annual
annual mean series
年均系列
参数:seasonal
repeating seasonal component
重复季节性成分
参数:events
optionally, the residual or "events" series
任选地,残留或“事件”系列
参考文献----------References----------
参见----------See Also----------
plotSeason, seasonTrend
plotSeason,seasonTrend
实例----------Examples----------
# Apply the function to a matrix time series,[应用的功能为一个矩阵,时间序列,]
# producing a list of decompositions[生产的列表分解]
ans <- vector('list', ncol(sfbayChla))
names(ans) <- colnames(sfbayChla)
for(i in seq(along = names(ans))) {
ans[[i]] <- decompTs(sfbayChla[, i])
}
# A quick plot for a time series decomposiiton[为一个时间系列decomposiiton的一个快速的图]
plot(ans[[7]], nc = 1, main = paste(names(ans)[7], "Chl-a decomposition"))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|