楼主: tulipsliu
4150 294

[学科前沿] [QuantEcon]MATLAB混编FORTRAN语言 [推广有奖]

促进中国计量经济学发展学科带头人

学科带头人

43%

还不是VIP/贵宾

-

威望
0
论坛币
386080 个
通用积分
470.0502
学术水平
127 点
热心指数
140 点
信用等级
103 点
经验
46957 点
帖子
1769
精华
0
在线时间
2479 小时
注册时间
2007-11-5
最后登录
2024-4-25

初级热心勋章

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
  - DisplayTables.m reads the Tables data from the results subfolder and prints them on screen using the same format and ordering as in the paper (without row names).

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Fortran dsge模型 MATLAB matla atlab

网速.png (31.53 KB)

运行时候的网速

运行时候的网速

DSGE_FORTRAN_compiling.zip

3.21 MB

需要: 50000 个论坛币  [购买]

source files

劳动经济学
沙发
tulipsliu 在职认证  发表于 2020-12-9 18:07:44 |只看作者 |坛友微信交流群
18:07  开始运行,看看最后的运行时间多少;
MATLAB 混编 FORTRAN 语言;

pool =

    'local'

Running Value Function Iteration...
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 6).
Distance after 20 iterations: 0.88956
Distance after 40 iterations: 0.23221

使用道具

藤椅
tulipsliu 在职认证  发表于 2020-12-9 18:14:45 |只看作者 |坛友微信交流群
pool =

    'local'

Running Value Function Iteration...
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 6).
Distance after 20 iterations: 0.88956
Distance after 40 iterations: 0.23221
Distance after 60 iterations: 0.084232
Distance after 80 iterations: 0.036514
Distance after 100 iterations: 0.017516
Distance after 120 iterations: 0.0088954
Distance after 140 iterations: 0.0046623
Distance after 160 iterations: 0.0024859
Distance after 180 iterations: 0.0013377
Value Function Iteration in iteration 1 completed
Running time : 610.1224 seconds.

Running Simulation...

使用道具

板凳
tulipsliu 在职认证  发表于 2020-12-9 18:45:46 |只看作者 |坛友微信交流群
Running Simulation...
Simulation in iteration 1 completed
Running time : 1739.3256 seconds.

================================================================
Plant-level investment distribution
CP-dist: 0.87518     0.10234    0.020394     0.10382    0.020994
Skewness : 2.776
Kurtosis : 12.2762
================================================================


================================================================
Iteration 1 completed
Minimum P-value : 0.98544
Maximum absolute change in LOMs : 0.00018834
================================================================


ans =

    1.6723


ans =

    1.4505


ans =

   57.2594


ans =

    0.0175

Running Value Function Iteration...


18:45 开始运行   Value Function Iteration  ,  VFI 值函数迭代。

使用道具

报纸
tulipsliu 在职认证  发表于 2020-12-9 19:08:32 |只看作者 |坛友微信交流群
19:09

Running Value Function Iteration...
Value Function Iteration in iteration 1 completed
Running time : 48.5786 seconds.

Running Simulation...
Simulation in iteration 1 completed
Running time : 14.5523 seconds.


================================================================
Phi =0
Iteration 1 completed
Minimum P-value : 0.94621
Maximum absolute change in LOMs : 0.00036588
================================================================


ans =

    1.6083


ans =

    1.3989


ans =

    2.6391


ans =

    1.1545

--------------------------------------
Table 2
--------------------------------------
GDP STD
--------------------------------------
    1.9600    1.4960    1.4694    1.4720

--------------------------------------
rel Var
--------------------------------------
    2.8200    3.5592    3.2460    3.2486
    1.0300    0.6071    0.6203    0.6201
    0.7200    0.4761    0.4540    0.4558
    2.2500    1.0299    1.0079    1.0109
    3.0200    1.0317    1.0102    1.0123
    0.5000    0.2438    0.2012    0.1889
    2.0800    0.8083    0.8186    0.8186

--------------------------------------
Correlation
--------------------------------------
    0.8500    0.8569    0.8838    0.8849
    0.8200    0.9403    0.9499    0.9487
    0.6100    0.9011    0.9044    0.9030
    0.3800    0.8372    0.8953    0.8996
    0.7900    0.6404    0.6294    0.6279
   -0.4300   -0.2074   -0.1733   -0.1619
   -0.0600    0.4596    0.4616    0.4592

--------------------------------------
Auto Correlation
--------------------------------------
    0.6500    0.2848    0.3241    0.3217
    0.6800    0.5817    0.5655    0.5715
    0.5700    0.3594    0.3800    0.3770
    0.4900    0.5573    0.5606    0.5600
    0.5000    0.5591    0.5630    0.5620
    0.5700    0.3235    0.4126    0.4187
    0.4500    0.6028    0.5704    0.5683

--------------------------------------


par =

  struct with fields:

            theta: 0.2500
               nu: 0.5000
            gamma: 1.0140
            delta: 0.0940
                b: 0
         disttype: 'uniform'
            xibar: 0.2000
                p: 1
          rho_eps: 0.9675
        sigma_eps: 0.0905
            sige1: 0.0586
            sige2: 0.1224
             weps: 0.5882
    update_weight: 1
             beta: 0.9700
                A: 1.8604
            sigma: 1.5000
            omega: 0.7000
        rho_zdiff: 0.7975
      sigma_zdiff: 6.6767e-04
         rho_zsum: 0.9801
       sigma_zsum: 0.0234
              kss: 1.0479

Running Value Function Iteration...
Distance after 20 iterations: 0.86682
Distance after 40 iterations: 0.22853
Distance after 60 iterations: 0.08331
Distance after 80 iterations: 0.036195
Distance after 100 iterations: 0.017381

使用道具

地板
tulipsliu 在职认证  发表于 2020-12-9 19:09:59 |只看作者 |坛友微信交流群
已经设定为只收论坛币  50 ;

是为了向我的论坛好友 epoh 大神致敬;
我和 epoh 认识快十年了; 在我的心里他一直是神一样的存在,论坛第一。
不多说了; 本来刚才修改帖子,这段话是放在帖子主页里的。 结果修改收论坛币 50 ,那段话消失了。

使用道具

7
tulipsliu 在职认证  发表于 2020-12-9 19:16:06 |只看作者 |坛友微信交流群
19:16

Running Value Function Iteration...
Distance after 20 iterations: 0.86682
Distance after 40 iterations: 0.22853
Distance after 60 iterations: 0.08331
Distance after 80 iterations: 0.036195
Distance after 100 iterations: 0.017381
Distance after 120 iterations: 0.0088322
Distance after 140 iterations: 0.0046307
Distance after 160 iterations: 0.0024695
Distance after 180 iterations: 0.0013291
Distance after 200 iterations: 0.00071879
Distance after 220 iterations: 0.00038974
Distance after 240 iterations: 0.00021162
Value Function Iteration in iteration 1 completed
Running time : 778.6659 seconds.

Running Simulation...

使用道具

8
tulipsliu 在职认证  发表于 2020-12-9 19:46:30 |只看作者 |坛友微信交流群
19:46

运行时间很长。哈哈

Running Simulation...
Simulation in iteration 1 completed
Running time : 1440.2181 seconds.

================================================================
Plant-level investment distribution
CP-dist: 0.87577     0.10208    0.020195     0.10342    0.020808
Skewness : 2.7878
Kurtosis : 12.3222
================================================================


================================================================
Iteration 1 completed
Minimum P-value : 0.042698
Maximum absolute change in LOMs : 0.0025818
================================================================


ans =

    1.6119


ans =

    1.4204


ans =

   43.3949


ans =

    0.0204

Running Value Function Iteration...
Distance after 20 iterations: 6.7428e-05
Value Function Iteration in iteration 2 completed
Running time : 95.1846 seconds.

Running Simulation...

使用道具

9
tulipsliu 在职认证  发表于 2020-12-9 20:42:10 |只看作者 |坛友微信交流群
20:42

程序还没运行结束, MATLAB 混编 FORTRAN 语言;

今晚不关机,明早起来看结果; 哈哈

Running Value Function Iteration...
Value Function Iteration in iteration 3 completed
Running time : 20.2216 seconds.

Running Simulation...
Simulation in iteration 3 completed
Running time : 10.4571 seconds.


================================================================
Phi =0.48
Iteration 3 completed
Minimum P-value : 0.78002
Maximum absolute change in LOMs : 0.00040181
================================================================


ans =

    1.5657


ans =

    1.3832


ans =

    2.0848


ans =

    1.0271

Running Value Function Iteration...
Value Function Iteration in iteration 1 completed
Running time : 21.422 seconds.

Running Simulation...

使用道具

10
tulipsliu 在职认证  发表于 2020-12-10 06:29:25 |只看作者 |坛友微信交流群
starting worker pid=13184 on localhost:11000 at 22:29:14.841

SAMPLING FOR MODEL 'correlation_ll' NOW (CHAIN 1).
Chain 1: Rejecting initial value:
Chain 1:   Error evaluating the log probability at the initial value.
Chain 1: Exception: Exception: Exception: out[9]=0; scale=1.5 alpha=4.24786 pa1=0.24476 pa2=-0.17658 th= 1.8019
4.27661
6.53225
8.16557  (in '/functions/pairwise.stan' at line 28; included from 'model_correlation_ll' at line 3)
  (in '/functions/pairwise.stan' at line 46; included from 'model_correlation_ll' at line 3)
  (in 'model_correlation_ll' at line 76)

Chain 1:
Chain 1: Gradient evaluation took 0 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: Iteration:   1 / 400 [  0%]  (Warmup)

SAMPLING FOR MODEL 'correlation_ll' NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 0.001 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 10 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
Chain 2: Iteration:   1 / 400 [  0%]  (Warmup)
Chain 1: Iteration:  40 / 400 [ 10%]  (Warmup)
Chain 2: Iteration:  40 / 400 [ 10%]  (Warmup)
Chain 1: Iteration:  80 / 400 [ 20%]  (Warmup)
Chain 2: Iteration:  80 / 400 [ 20%]  (Warmup)
Chain 1: Iteration: 120 / 400 [ 30%]  (Warmup)
Chain 2: Iteration: 120 / 400 [ 30%]  (Warmup)
Chain 1: Iteration: 160 / 400 [ 40%]  (Warmup)
Chain 2: Iteration: 160 / 400 [ 40%]  (Warmup)
Chain 1: Iteration: 200 / 400 [ 50%]  (Warmup)
Chain 1: Iteration: 201 / 400 [ 50%]  (Sampling)
Chain 2: Iteration: 200 / 400 [ 50%]  (Warmup)
Chain 2: Iteration: 201 / 400 [ 50%]  (Sampling)
Chain 1: Iteration: 240 / 400 [ 60%]  (Sampling)
Chain 2: Iteration: 240 / 400 [ 60%]  (Sampling)

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-26 12:06