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

R语言:stl()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-17 10:20:44 | 显示全部楼层 |阅读模式
stl(stats)
stl()所属R语言包:stats

                                        Seasonal Decomposition of Time Series by Loess
                                         季节性时间序列分解黄土

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

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

Decompose a time series into seasonal, trend and irregular components using loess, acronym STL.
分解到季节性,趋势和不规则的组件,使用loess,简称STL的时间序列。


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


stl(x, s.window, s.degree = 0,
    t.window = NULL, t.degree = 1,
    l.window = nextodd(period), l.degree = t.degree,
    s.jump = ceiling(s.window/10),
    t.jump = ceiling(t.window/10),
    l.jump = ceiling(l.window/10),
    robust = FALSE,
    inner = if(robust)  1 else 2,
    outer = if(robust) 15 else 0,
    na.action = na.fail)



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

参数:x
univariate time series to be decomposed. This should be an object of class "ts" with a frequency greater than one.
单变量时间序列进行分解。这应该是一个类"ts"频率大于一的对象。


参数:s.window
either the character string "periodic" or the span (in lags) of the loess window for seasonal extraction, which should be odd.  This has no default.
要么字符串"periodic"或季节性的提取,这应该是很奇怪的黄土窗口跨度(滞后)。这有没有默认值。


参数:s.degree
degree of locally-fitted polynomial in seasonal extraction.  Should be zero or one.
本地多项式拟合季节性提取的程度。应该是零或一。


参数:t.window
the span (in lags) of the loess window for trend extraction, which should be odd.  If NULL, the default, nextodd(ceiling((1.5*period) / (1-(1.5/s.window)))), is taken.
跨度趋势提取黄土窗口(滞后),这应该是奇数。如果NULL,默认情况下,nextodd(ceiling((1.5*period) / (1-(1.5/s.window)))),采取。


参数:t.degree
degree of locally-fitted polynomial in trend extraction.  Should be zero or one.
本地安装在多项式趋势提取的程度。应该是零或一。


参数:l.window
the span (in lags) of the loess window of the low-pass filter used for each subseries.  Defaults to the smallest odd integer greater than or equal to frequency(x) which is recommended since it prevents competition between the trend and seasonal components.  If not an odd integer its given value is increased to the next odd one.
跨度黄土窗口,每个子系列所使用的低通滤波器(滞后)。默认为最小的奇数整数大于或等于frequency(x)建议的趋势和季节性组件之间的竞争,因为它可以防止。如果不是奇数,其给定值上升到下一个奇数。


参数:l.degree
degree of locally-fitted polynomial for the subseries low-pass filter.  Must be 0 or 1.
度本地拟合多项式为子系列的低通滤波器。必须为0或1。


参数:s.jump, t.jump, l.jump
integers at least one to increase speed of the respective smoother.  Linear interpolation happens between every *.jumpth value.
整数至少有一个提高各自的流畅速度。每*.jump个值之间的线性插值发生。


参数:robust
logical indicating if robust fitting be used in the loess procedure.
逻辑表明在loess程序,如果强大的拟合。


参数:inner
integer; the number of "inner" (backfitting) iterations; usually very few (2) iterations suffice.
整数;内在(backfitting)迭代的数量通常很少(2)迭代足矣。


参数:outer
integer; the number of "outer" robustness iterations.
整数;外的鲁棒性迭代的数量。


参数:na.action
action on missing values.
行动上的缺失值。


Details

详情----------Details----------

The seasonal component is found by loess smoothing the seasonal sub-series (the series of all January values, ...); if s.window = "periodic" smoothing is effectively replaced by taking the mean. The seasonal values are removed, and the remainder smoothed to find the trend. The overall level is removed from the seasonal component and added to the trend component. This process is iterated a few times.  The remainder component is the residuals from the seasonal plus trend fit.
季节性组件黄土平滑季节性子系列(系列全部1值,...);如果s.window = "periodic"平滑平均有效取代。季节性的值将被删除,其余平滑的趋势。整体水平,从季节性分量和趋势组件。这个过程重复几次。 remainder组件是从季节性的加的趋势拟合的残差。

Several methods for the resulting class "stl" objects, see, plot.stl.
类"stl"对象的几种方法,请参阅,plot.stl。


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

stl returns an object of class "stl" with components
stl返回"stl"类的对象组件


参数:time.series
a multiple time series with columns seasonal, trend and remainder.
与列多个时间序列seasonal,trend和remainder。


参数:weights
the final robust weights (all one if fitting is not done robustly).
最后强大的权重(如果不这样做有力拟合)。


参数:call
the matched call.
匹配的呼叫。


参数:win
integer (length 3 vector) with the spans used for the "s", "t", and "l" smoothers.
整数(长度为3的向量)用于"s","t","l"平滑的跨度。


参数:deg
integer (length 3) vector with the polynomial degrees for these smoothers.
整数(长度为3)向量多项式平滑度。


参数:jump
integer (length 3) vector with the "jumps" (skips) used for these smoothers.
整数(长度为3)向量与这些光滑的“跳跃”(跳过)。


参数:ni
number of inner iterations
数内迭代


参数:no
number of outer robustness iterations
数外鲁棒迭代


注意----------Note----------

This is similar to but not identical to the stl function in S-PLUS. The remainder component given by S-PLUS is the sum of
这是相似但不相同的stl,S-PLUS的功能。 remainder分量,S-PLUS的总和


作者(S)----------Author(s)----------


B.D. Ripley; Fortran code by Cleveland <EM>et al.</EM> (1990) from
&lsquo;<span class="file">netlib</span>&rsquo;.



参考文献----------References----------

STL:  A  Seasonal-Trend  Decomposition  Procedure Based on Loess. Journal of Official Statistics, 6, 3&ndash;73.

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

plot.stl for stl methods; loess in package stats (which is not actually used in stl).
plot.stlstl方法;loess包stats(这是不实际使用stl)。

StructTS for different kind of decomposition.
StructTS不同种类的分解。


举例----------Examples----------


require(graphics)

plot(stl(nottem, "per"))
plot(stl(nottem, s.window = 4, t.window = 50, t.jump = 1))

plot(stllc <- stl(log(co2), s.window=21))
summary(stllc)
## linear trend, strict period.[#线性趋势,严格的时期。]
plot(stl(log(co2), s.window="per", t.window=1000))

## Two STL plotted side by side :[#两个STL绘制并排:]
        stmd &lt;- stl(mdeaths, s.window = "per") # non-robust[非健壮]
summary(stmR <- stl(mdeaths, s.window = "per", robust = TRUE))
op <- par(mar = c(0, 4, 0, 3), oma = c(5, 0, 4, 0), mfcol = c(4, 2))
plot(stmd, set.pars=NULL, labels = NULL,
     main = "stl(mdeaths, s.w = \"per\",  robust = FALSE / TRUE )")
plot(stmR, set.pars=NULL)
# mark the 'outliers' :[纪念“离群值”:]
(iO &lt;- which(stmR $ weights  &lt; 1e-8)) # 10 were considered outliers[10被认为是离群]
sts <- stmR$time.series
points(time(sts)[iO], 0.8* sts[,"remainder"][iO], pch = 4, col = "red")
par(op)# reset[重置]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 02:16 , Processed in 0.020680 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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