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

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

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

                                        Fit Structural Time Series
                                         适应结构的时间系列

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

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

Fit a structural model for a time series by maximum likelihood.
适合一个时间序列的结构模型,最大似然。


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


StructTS(x, type = c("level", "trend", "BSM"), init = NULL,
         fixed = NULL, optim.control = NULL)



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

参数:x
a univariate numeric time series. Missing values are allowed.
一元的数字时间序列。遗漏值是不允许的。


参数:type
the class of structural model.  If omitted, a BSM is used for a time series with frequency(x) > 1, and a local trend model otherwise.
类结构模型。如果省略,BSM是用于与frequency(x) > 1,否则本地趋势模型的时间序列。


参数:init
initial values of the variance parameters.
方差参数的初始值。


参数:fixed
optional numeric vector of the same length as the total number of parameters.  If supplied, only NA entries in fixed will be varied.  Probably most useful for setting variances to zero.
可选的数字作为参数的总数相同长度的向量。如果提供,仅NA项fixed将各不相同。可能是最有用的设置方差为零。


参数:optim.control
List of control parameters for optim.  Method "L-BFGS-B" is used.
名单optim的控制参数。方法"L-BFGS-B"使用。


Details

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

Structural time series models are (linear Gaussian) state-space models for (univariate) time series based on a decomposition of the series into a number of components. They are specified by a set of error variances, some of which may be zero.
结构时间序列模型(线性高斯)的基础上,分解成一个元件数量系列(单因素)时间序列的状态空间模型。他们指定了一套错误的差异,其中一些可能是零。

The simplest model is the local level model specified by type = "level".  This has an underlying level m[t] which evolves by
最简单的模型是地方一级的type = "level"指定的模型。这有一个基本的水平m[t]它的发展由

The observations are
的意见

There are two parameters, σ^2_ξ and σ^2_eps.  It is an ARIMA(0,1,1) model, but with restrictions on the parameter set.
有两个参数,σ^2_ξ和σ^2_eps。这是一个ARIMA(0,1,1)模型,但与参数设置的限制。

The local linear trend model, type = "trend", has the same measurement equation, but with a time-varying slope in the dynamics for m[t], given by
局部线性趋势模型,type = "trend",具有相同的测量方程,但在随时间变化的动态m[t]斜坡,鉴于

with three variance parameters.  It is not uncommon to find σ^2_ζ = 0 (which reduces to the local level model) or σ^2_ξ = 0, which ensures a smooth trend.  This is a restricted ARIMA(0,2,2) model.
三方差参数。这是不难发现σ^2_ζ = 0(降低到当地水平模型)或σ^2_ξ = 0,以确保平稳的趋势。这是一个受限制的ARIMA(0,2,2)模型。

The basic structural model, type = "BSM", is a local trend model with an additional seasonal component. Thus the measurement equation is
的基本结构模型,type = "BSM",是一个额外的季节性成分的趋势模型。因此,测量方程式

where s[t] is a seasonal component with dynamics
s[t]是一个动态的季节性成分

The boundary case σ^2_w = 0 corresponds to a deterministic (but arbitrary) seasonal pattern.  (This is sometimes known as the "dummy variable" version of the BSM.)
边界的情况下σ^2_w = 0对应一个确定性(但任意)的季节性模式。 (这有时被称为“哑变量”版本的BSM)。


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

A list of class "StructTS" with components:
一类"StructTS"与组件的列表:


参数:coef
the estimated variances of the components.
组件的估计方差。


参数:loglik
the maximized log-likelihood.  Note that as all these models are non-stationary this includes a diffuse prior for some observations and hence is not comparable with arima nor different types of structural models.
最大化对数似然。请注意,由于所有这些模型都是非平稳的,这包括前弥漫的一些意见,因此是不能用arima也不同类型的结构模型相媲美。


参数:data
the time series x.
时间序列x。


参数:residuals
the standardized residuals.
标准化残差。


参数:fitted
a multiple time series with one component for the level, slope and seasonal components, estimated contemporaneously (that is at time t and not at the end of the series).
与水平,坡度和季节性组件的一个组成部分的多时间序列,contemporaneously估计(即时间t,而不是在系列的结尾)。


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


参数:series
the name of the series x.
名称系列x。


参数:code
the convergence code returned by optim.
convergence代码optim返回。


参数:model, model0
Lists representing the Kalman Filter used in the fitting.  See KalmanLike.  model0 is the initial state of the filter, model its final state.
名单代表在装修中使用的卡尔曼滤波。看到KalmanLike。 model0是过滤器的初始状态,model它的最终状态。


参数:xtsp
the tsp attributes of x.
tsp属性x。


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

Optimization of structural models is a lot harder than many of the references admit. For example, the AirPassengers data are considered in Brockwell & Davis (1996): their solution appears to be a local maximum, but nowhere near as good a fit as that produced by StructTS.  It is quite common to find fits with one or more variances zero, and this can include sigma^2_eps.
优化结构模型是比许多引用承认困难很多。例如,AirPassengers数据被认为是在Brockwell戴维斯(1996):他们的解决方案似乎是当地最大的,但远不及良好的生产StructTS适合近。找到一个或多个方差为零的配合是很常见的,这可以包括sigma^2_eps。


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

Introduction to Time Series and Forecasting. Springer, New York. Sections 8.2 and 8.5.
State Space Methods.  Oxford University Press.
Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge University Press.
2nd Edition, Harvester Wheatsheaf.

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

KalmanLike, tsSmooth; stl for different kind of (seasonal) decomposition.
KalmanLike,tsSmooth;stl为不同类型的(季节性)分解。


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


## see also JohnsonJohnson, Nile and AirPassengers[#又见JohnsonJohnson,尼罗河和AirPassengers的]
require(graphics)

trees <- window(treering, start=0)
(fit <- StructTS(trees, type = "level"))
plot(trees)
lines(fitted(fit), col = "green")
tsdiag(fit)

(fit <- StructTS(log10(UKgas), type = "BSM"))
par(mfrow = c(4, 1))
plot(log10(UKgas))
plot(cbind(fitted(fit), resids=resid(fit)), main = "UK gas consumption")

## keep some parameters fixed; trace optimizer:[#保持一些固定的参数,跟踪优化:]
StructTS(log10(UKgas), type = "BSM", fixed = c(0.1,0.001,NA,NA),
         optim.control = list(trace=TRUE))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-3 00:45 , Processed in 0.025261 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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