遇见数据集

Supplement. Demonstration of Kalman filtering smoothing and confidence interval calibration.

收藏
Figshare2016-08-05 更新2026-04-29 收录
官方服务:

资源简介:

File List kf_algorithm.R Description This file contains R-code which demonstrates the Kalman filter and smoother and construction of CIC curves. No estimation of parameters is shown, however, the negative log-likelihood is calculated and so this code could be modified to be used for mMaximum-likelihood estimation of parameters. Note that estimation routines used in practice are best coded in a compiled language (e.g., C/Fortran) for optimal speed. Modifications to the code below will allow for parameter estimation, but it is likely to be quite slow. The function sim.track generates some simulated data from a bivariate random walk. For simplicity the simulation gives a regular time series of positions. Also demonstrated is the construction of confidence interval calibration (CIC) curves. In this case because the correct parameter values are used the CIC curve is the best possible case. By tinkering with the parameter values in the error covariance, the user will be able to see how the CIC curves change. To run the code open an R session and source the code then run the kfdemo function: > source('kfalgorithm.R') > kfdemo()

文件列表:kf_algorithm.R 说明 本文件包含R语言代码,用于演示卡尔曼滤波(Kalman filter)与平滑器的实现,以及置信区间校准(Confidence Interval Calibration, CIC)曲线的构建。尽管本代码未展示参数估计流程,但已实现负对数似然的计算,因此可通过修改代码将其用于参数的极大似然估计。 请注意,实际应用中的估计程序最好使用编译型语言(如C/Fortran)编写,以获得最优运行速度。若对下述代码进行修改以实现参数估计,其运行速度大概率会较为缓慢。 sim.track函数可从二元随机游走模型中生成模拟数据,为简化流程,该模拟生成的是规则化的位置时间序列。本代码同时演示了置信区间校准(CIC)曲线的构建:在此示例中,由于使用了正确的参数值,所得CIC曲线为理论最优情形。用户可通过调整误差协方差中的参数值,观察CIC曲线的变化情况。 运行该代码需打开R会话,先加载代码文件再执行kfdemo函数: > source('kfalgorithm.R') > kfdemo()

创建时间:
2016-08-05
二维码
社区交流群
二维码
科研交流群
商业服务