楼主: 向修海
12416 25

有关gauss的DSGE程序 [推广有奖]

11
zhaomn200145(未真实交易用户) 发表于 2011-1-6 22:47:01
zhangtao 发表于 2011-1-5 09:29
Undefined symbols:
    _plegend                           F:\0计量经济学前沿\Gauss\DSGE(17July2010)\SolveQA2.src(912)

(0) : error G0511 : Program compile failed
运行DSGE_QA.g后,提示以上错误
我估计是不是你的src文件放错了位置?

12
zhangtao(真实交易用户) 发表于 2011-1-7 21:14:04
我因为学习gauss已经一年多了,程序不能完全看懂,但是lib和src文件我觉得应该放对了,另外,
我的路径应该也是正确的,我用的是gauss7.0,请楼上的各位朋友和老师再想想还会是其他什么原因呢?非常感谢!
Gauss7.0软件的用法我会,就是程序看不懂。

13
zhangtao(真实交易用户) 发表于 2011-1-7 21:33:14
第一个程序LA
Undefined symbols:
    _plegend                           C:\DSGE(17July2010)\SolveLA3.src(826)
proc(0)=SetLegend(j,ymin,ymax,i,sn);
    local a,b;
    调试提示这一行有问题:external matrix _plegctl, _plegend;

    if ismiss(_plegend[sn,i,1]);
        if abs(ymin)>ymax;
           _plegctl=(1~6~floor(j/3)~ymin);
        else;
          _plegctl=(1~6~floor(j/3)~0.5*ymax);
        endif;
第二个程序QA
Undefined symbols:
    _plegend                           C:\DSGE(17July2010)\SolveQA2.src(912)

    proc(0)=SetLegend(j,ymin,ymax,i,sn);
    local a,b;
    提示这一行有错误:external matrix _plegctl, _plegend;

    if ismiss(_plegend[sn,i,1]);
        if abs(ymin)>ymax;
           _plegctl=(1~6~floor(j/3)~ymin);
        else;
          _plegctl=(1~6~floor(j/3)~0.5*ymax);
        endif;

14
zhangtao(真实交易用户) 发表于 2011-1-7 21:38:12
C:\DSGE\SolveQA2.src(157) : Redefinition of '_linear'
     (proc)_linear being declared external matrix
C:\DSGE\SolveQA2.src(161) : error G1001 : 'ENDIF' : Expected nothing  
   PROC without ENDP G0278 : 'PF'
   Label undefined G0090 : 'ende'


c:\gauss\src\pgraph.dec(506) : Redefinition of '_pdate'
     (matrix)_pdate being declared external string
(0) : error G0090 : 'ende' : Label undefined

15
epoh(未真实交易用户) 发表于 2011-8-2 21:44:51

打开SolveLA1.src

加入底下这一段:

/* Initialize the array that can be used to position the legend individually */
ord=_nz|6|2;
_plegend=arrayinit(ord,0);
for i (1,6,1);
    for j (1,_nz,1);
        _plegend[j,i,1]=miss(1,1);
    endfor;
endfor;

@ ---------------
        -------------- @

打开 DSGE_LA.g

/* Choice of random numbers */

将/*_makeShocks=0; @ "if=1, an array of shocks will be created

                   that can be used in repeated simulations"   @*/

改为

_makeShocks=1;

@ ---------------
        -------------- @

运行结果:

02 August 2011
19:37:59

Eigenvalues of W:

      0.97250876                     
       1.0396476                     

Second moments from simulated data:

Output                    1.47    1.00    1.00    0.65
Consumption               0.57    0.39    0.99    0.67
Investment                6.25    4.26    1.00    0.65
Hours                     0.79    0.54    1.00    0.65
Real Wage                 0.69    0.47    0.99    0.66
Rental Rate of Capital    1.51    1.03    0.98    0.65

Column 1: Variable name
Column 2: Standard deviation
Column 3: Standard deviation relative to standard deviation of variable Output
Column 4: Cross correlation with Output
Column 5: First order autocorrelation

已有 1 人评分学术水平 热心指数 信用等级 收起 理由
zhangtao + 5 + 5 + 5 对epoh大师致以最崇高的敬意!

总评分: 学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

16
zhangtao(真实交易用户) 发表于 2011-8-3 08:52:35
epoh 发表于 2011-8-2 21:44
打开SolveLA1.src 加入底下这一段: /* Initialize the array that can be used to position the legend ind ...
epoh老师,您好!
      程序能正常运行,我想问一下:
* Initialize the array that can be used to position the legend individually */
ord=_nz|6|2;
_plegend=arrayinit(ord,0);
for i (1,6,1);
    for j (1,_nz,1);
        _plegend[j,i,1]=miss(1,1);
    endfor;
endfor;

这几行程序是什么意思?ord=_nz|6|2;是什么意思?
for i 和for j循环赋值是对什么进行赋值?
另外,原程序包中的Tools.dll是做什么用的?是用那个软件做成的?
我记得Gauss不能做.dll文件。
SolveLA1.src这个程序有什么用?
非常感谢!


数学好就是要天天学

17
epoh(未真实交易用户) 发表于 2011-8-3 22:05:58
_nz=1;
ord=_nz|6|2;
    1.0000000
    6.0000000
    2.0000000

_plegend=arrayinit(ord,0);
    Plane [1,.,.]
      0.00000000       0.00000000
      0.00000000       0.00000000
      0.00000000       0.00000000
      0.00000000       0.00000000
      0.00000000       0.00000000
      0.00000000       0.00000000

for i (1,6,1);
    for j (1,_nz,1);
        _plegend[j,i,1]=miss(1,1);
    endfor;
endfor;

_plegend
Plane [1,.,.]
               .       0.00000000
               .       0.00000000
               .       0.00000000
               .       0.00000000
               .       0.00000000
               .       0.00000000

The GAUSS Engine makes all of the functionality of GAUSS available
in a dynamically linked library (.DLL) under Windows,
or shared library (.so) under UNIX.

Tools.dll:This dynamic link library contains routines written in
          Fortran that implement the Schur and the generalized
          Schur factorization of matrices.
          see DSGE: User Guide page 2/12

18
lianbs(真实交易用户) 发表于 2011-8-31 17:49:08
谢谢。。。

19
gssdzc(未真实交易用户) 在职认证  发表于 2011-10-22 08:46:50
thanks a lot

20
futurept(真实交易用户) 发表于 2012-3-21 23:45:03
Thanks!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-28 13:36