我如何在 R 中这样做?如果你知道,请给我一个页面?如果您有任何不清楚的地方,请不要记下,让我知道它是什么,我会尽量把它说清楚.非常感谢您提前 解决方案 我无法找到如何按照我想要的方式设置限制.但是,我找到了一种方法来通过执行以下操作.尝试使用特定的信息标准(如)找出滞后的数量VARselect(y, lag.max=10, type="const")这将使您能够找到滞后长度.我发现它是我的情况之一.然后将 VAR(1) 模型拟合到您的数据中.在我的情况下是 y.t=VAR(y, p=1, type="const")当我查看摘要时.我发现某些系数在统计上可能不显着.summary(t)然后从包'vars'运行内置函数t1=restrict(t, method = "ser", thresh = 2.0, resmat = NULL)此函数通过按重要性强加零限制来实现对 VAR 的估计看结果写summary(t1)I was trying to understand how may I fit a VAR model that is specific andnot general.I understand that fitting a model such as general VAR(1) is done byimporting the "vars" package from Cranfor exampleconsider that y is a matrix of a 10 by 2. then I did this after importing vars package y=df[,1:2] # df is a dataframe with alot of columns (just care about the first two)VARselect(y, lag.max=10, type="const")summary(fitHilda <- VAR(y, p=1, type="const"))This work fine if no restriction is being made on the coefficients. However, if I would like to fit this restricted VAR model in RHow may I do so in R?Please refer me to a page if you know any? If there is anything unclear from your prespective please do not mark down let me know what is it and I will try to make it as clear as I understand.Thank you very much in advance 解决方案 I was not able to find how may I put restrictions the way I would like to. However, I find a way to go through that by doing as follow.Try to find the number of lags using a certain information criterion like VARselect(y, lag.max=10, type="const")This will enable you to find the lag length. I found it to be one in my case. Then afterwards fit a VAR(1) model to your data. which is in my case y. t=VAR(y, p=1, type="const")When I view the summary. I find that some of the coefficients may be statistically insignificant. summary(t)Then afterwards run the built-in function from the package 'vars' t1=restrict(t, method = "ser", thresh = 2.0, resmat = NULL)This function enables one to Estimation of a VAR, by imposing zero restrictions by significanceto see the result write summary(t1) 这篇关于如何在 R 中拟合受限 VAR 模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!