我正在使用从 MATLAB 文档中获取的以下代码来估计 ARMA 模型的参数:
y = sin([1:300]') + 0.5 * randn(300, 1);
y = iddata(y);
mb = ar(y, 4, 'burg');
此时,如果我输入 mb
,我得到的是:
Discrete-time IDPOLY model:
A(q)y(t) = e(t)
A(q) = 1 - 0.2764 q^-1 + 0.2069 q^-2 + 0.4804 q^-3 + 0.1424 q^-4
Estimated using AR ('burg'/'now') from data set y
Loss function 0.314965 and FPE 0.323364
Sampling interval: 1
如何使用我获得的变量 mb
生成具有这些系数的样本?
mb
看起来不像一个向量。
特别是,我该如何处理丢失的数据?
最佳答案
使用:sim(mb,input)
Simulate linear models.
Syntax
y = sim(m,ue)
[y, ysd] = sim(m,ue,init)
Description
m is an arbitrary idmodel object.
ue is an iddata object, containing inputs only. The number of input channels in ue must either be equal to the number of inputs of the model m, or equal to the sum of the number of inputs and noise sources (= number of outputs). In the latter case the last inputs in ue are regarded as noise sources and a noise-corrupted simulation is obtained. The noise is scaled according to the property m.NoiseVariance in m, so in order to obtain the right noise level according to the model, the noise inputs should be white noise with zero mean and unit covariance matrix. If no noise sources are contained in ue, a noise-free simulation is obtained.
关于statistics - 使用 MATLAB 的 AR 模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11278217/