如何将系列从 Gretl 命令导出到 xlsx/csv

问题描述

我正在尝试用 Gretl 测试 SVAR 的源代码(请参阅 http://mayoral.iae-csic.org/timeseries_insead/svar_gretl.pdf 的第 20 页)

set echo off
set messages off
include SVAR.gfn
open BlQuah.gdt

list X = DY U
list exog = const time

# set up the model
BQModel = SVAR_setup("C",X,exog,8)

# set up the long-run restriction
SVAR_restrict(&BQModel,"lrC",1,2,0)

# perform estimation
SVAR_estimate(&BQModel)

# Now perform historical decomposition
list HDDY = SVAR_hd(&BQModel,1)
list HDU = SVAR_hd(&BQModel,2)

# check that the observed time series can be reproduced exactly from the individual decomposed series

ols DY const HDDY

# cumulate the effect of the demand shock on DY

series hd_Y_2 = cum(hd_DY_2)

当我尝试运行最后一行代码时,出现以下错误。我认为源代码可能有错误,所以我希望尝试找到解决方案?

cum: argument should be series,is list

此外,有没有办法将 hd_Y_2 系列保存为数据框并将其导出到 Excel 文件中?

TIA!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)