KalmanLike(stats)
KalmanLike()所属R语言包:stats
Kalman Filtering
卡尔曼滤波
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Use Kalman Filtering to find the (Gaussian) log-likelihood, or for forecasting or smoothing.
使用卡尔曼滤波(高斯)日志的可能性,或预测或平滑。
用法----------Usage----------
KalmanLike(y, mod, nit = 0, fast=TRUE)
KalmanRun(y, mod, nit = 0, fast=TRUE)
KalmanSmooth(y, mod, nit = 0)
KalmanForecast(n.ahead = 10, mod, fast=TRUE)
makeARIMA(phi, theta, Delta, kappa = 1e6)
参数----------Arguments----------
参数:y
a univariate time series.
单变量时间序列。
参数:mod
A list describing the state-space model: see "Details".
列表描述的状态空间模型:见“详细资料”。
参数:nit
The time at which the initialization is computed. nit = 0 implies that the initialization is for a one-step prediction, so Pn should not be computed at the first step.
在初始化计算的时间。 nit = 0意味着初始化一个步预测,所以不应该被计算在第一步Pn。
参数:n.ahead
The number of steps ahead for which prediction is required.
的步数,提前预测需要。
参数:phi, theta
numeric vectors of length ≥ 0 giving AR and MA parameters.
数值向量的长度≥ 0给AR和MA参数。
参数:Delta
vector of differencing coefficients, so an ARMA model is fitted to y[t] - Delta[1]*y[t-1] - ....
差分系数向量,使ARMA模型被安装到y[t] - Delta[1]*y[t-1] - ...。
参数:kappa
the prior variance (as a multiple of the innovations variance) for the past observations in a differenced model.
前方差(创新方差的倍数)差分模型在过去的观测。
参数:fast
If TRUE the mod object may be modified.
如果TRUEmod对象可能被修改。
Details
详情----------Details----------
These functions work with a general univariate state-space model with state vector a, transitions a <- T a + R e, e ~ N(0, kappa Q) and observation equation y = Z'a + eta, eta ~ N(0, kappa h). The likelihood is a profile likelihood after estimation of kappa.
这些功能与一般的单变量的状态空间模型与状态向量a,转换a <- T a + R e,e ~ N(0, kappa Q)和观测方程y = Z'a + eta,eta ~ N(0, kappa h)。的可能性后,估计kappa的个人资料的可能性。
The model is specified as a list with at least components
该模型被指定为组件至少列表
T the transition matrix
T过渡矩阵
Z the observation coefficients
Z观察系数
h the observation variance
h观测方差
V RQR'
VRQR'
a the current state estimate
a目前的状态估计
P the current estimate of the state uncertainty matrix
P目前的状态的不确定性矩阵的估计
Pn the estimate at time t-1 of the state
Pn时间估计t-1的状态
KalmanSmooth is the workhorse function for tsSmooth.
KalmanSmooth是tsSmooth的主力功能。
makeARIMA constructs the state-space model for an ARIMA model.
makeARIMA构建ARIMA模型的状态空间模型。
值----------Value----------
For KalmanLike, a list with components Lik (the log-likelihood less some constants) and s2, the estimate of kappa.
对于KalmanLike,一个组件的列表Lik(日志的可能性少一些常量)和s2,估计kappa。
For KalmanRun, a list with components values, a vector of length 2 giving the output of KalmanLike, resid (the residuals) and states, the contemporaneous state estimates, a matrix with one row for each time.
KalmanRun,一个组件的列表values,给予KalmanLikeresid(残差向量的长度2)输出和states,同期状态估计,每次一行的矩阵。
For KalmanSmooth, a list with two components. Component smooth is a n by p matrix of state estimates based on all the observations, with one row for each time. Component var is a n by p by p array of variance matrices.
KalmanSmooth,具有两个组件的列表。组件smooth是np状态矩阵估计所有的意见的基础上,一排,每次。组件var是npp方差矩阵数组。
For KalmanForecast, a list with components pred, the predictions, and var, the unscaled variances of the prediction errors (to be multiplied by s2).
KalmanForecast,一个组件的列表pred“的预言,和var,预测误差的非标度的差异(要乘以s2)。
For makeARIMA, a model list including components for its arguments.
对于makeARIMA,模型列表,包括其论据的组成部分。
警告----------Warning----------
These functions are designed to be called from other functions which check the validity of the arguments passed, so very little checking is done.
被称为检查传递参数的有效性等功能,这些功能设计的,所以很少检查。
In particular, KalmanLike alters the objects passed as the elements a, P and Pn of mod, so these should not be shared. Use fast=FALSE to prevent this.
尤其是KalmanLike改变的元素通过a,P和Pnmod,所以这些不应该被共享的对象。使用fast=FALSE来防止这种情况。
参考文献----------References----------
State Space Methods. Oxford University Press.
参见----------See Also----------
arima, StructTS. tsSmooth.
arima,StructTS。 tsSmooth。
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|