全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5247 11
2017-04-07
悬赏 100 个论坛币 未解决
用连老师的面板门槛模型在设置BS值的时候,如果设置的次数超过观察数就出现错误。
matsize too small
    You have attempted to create a matrix with too many rows or columns
    or attempted to fit a model with too many variables.  You need to
    increase matsize; it is currently 405.  Use set matsize; see help
    matsize.

    If you are using factor variables and included an interaction that
    has lots of missing cells, either increase matsize or set emptycells
    drop to reduce the required matrix size; see help set emptycells.

    If you are using factor variables, you might have accidentally
    treated a continuous variable as a categorical, resulting in lots of
    categories.  Use the c. operator on such variables.

set matsize 11000根本就没有用,得到的结果依然错误
求大神来帮忙啊~
QQ截图20170407194717.png

原图尺寸 84.19 KB

QQ截图20170407194717.png

二维码

扫码加我 拉你入群

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

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

全部回复
2017-4-8 10:24:07
把min()里的值填的大一点
二维码

扫码加我 拉你入群

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

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

2017-4-8 18:37:24
优雅的胖子 发表于 2017-4-8 10:24
把min()里的值填的大一点
   xtthres sr lnincome cpi g r, thres(g) dthres(ydr) ///
>                    min(200) bs1(500) bs2(500) bs3(500)

Begin Time : 8 Apr 2017 18:30:36



    +----------------------------------+
    |    ---单一门槛面板模型---    |
+----------------------------------+

第一个门槛估计值:10.525993


Fixed-effects (within) regression               Number of obs      =       420
Group variable: code                            Number of groups   =        28

R-sq:  within  = 0.6262                         Obs per group: min =        15
       between = 0.0012                                        avg =      15.0
       overall = 0.3425                                        max =        15

                                                F(6,386)           =    107.76
corr(u_i, Xb)  = -0.1444                        Prob > F           =    0.0000

------------------------------------------------------------------------------
          sr |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    lnincome |   .0597806   .0044208    13.52   0.000     .0510888    .0684725
         cpi |   .0003961   .0008992     0.44   0.660    -.0013718    .0021641
           g |   .0003115   .0006866     0.45   0.650    -.0010385    .0016616
           r |   .0025292   .0034144     0.74   0.459    -.0041839    .0092422
       ydr_1 |  -.0026206   .0006579    -3.98   0.000     -.003914   -.0013271
       ydr_2 |  -.0024017   .0006738    -3.56   0.000    -.0037265   -.0010768
       _cons |  -.2531129   .0521877    -4.85   0.000    -.3557206   -.1505052
-------------+----------------------------------------------------------------
     sigma_u |  .03904374
     sigma_e |  .02944234
         rho |  .63749259   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(27, 386) =    20.17             Prob > F = 0.0000

STATA 自抽样中,请等待 ... ...

matsize too small
    You have attempted to create a matrix with too many rows or columns or
    attempted to fit a model with too many variables.  You need to increase
    matsize; it is currently 420.  Use set matsize; see help matsize.

    If you are using factor variables and included an interaction that has
    lots of missing cells, either increase matsize or set emptycells drop to
    reduce the required matrix size; see help set emptycells.

    If you are using factor variables, you might have accidentally treated a
    continuous variable as a categorical, resulting in lots of categories.
    Use the c. operator on such variables.
r(908);
都设成200了还是这个样子
二维码

扫码加我 拉你入群

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

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

2017-4-8 21:02:11
你的代码“ xtthres sr lnincome cpi g r, thres(g) dthres(ydr) ///
>                    min(200) bs1(500) bs2(500) bs3(500) ”

中,请把“xtthres sr lnincome cpi g r”中的“g”去掉,你的样本量是420,建议min()设置为15
二维码

扫码加我 拉你入群

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

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

2017-4-9 16:35:57

.            xtthres sr odr lnincome cpi r , thres(g) dthres(ydr) ///
>        min(15) bs1(500) bs2(500) bs3(500)

Begin Time : 9 Apr 2017 16:34:22



    +----------------------------------+
    |    ---单一门槛面板模型---    |
+----------------------------------+

第一个门槛估计值:12.960222


Fixed-effects (within) regression               Number of obs      =      
> 405
Group variable: code                            Number of groups   =      
>  27

R-sq:  within  = 0.2005                         Obs per group: min =      
>  15
       between = 0.0748                                        avg =      1
> 5.0
       overall = 0.0033                                        max =      
>  15

                                                F(6,372)           =     15
> .54
corr(u_i, Xb)  = -0.5586                        Prob > F           =    0.0
> 000

---------------------------------------------------------------------------
> ---
          sr |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interv
> al]
-------------+-------------------------------------------------------------
> ---
         odr |  -1.016035   .2178929    -4.66   0.000    -1.444491   -.5875
> 784
    lnincome |   .2193328   1.030739     0.21   0.832    -1.807473    2.246
> 139
         cpi |   .0964402   .1427573     0.68   0.500    -.1842723    .3771
> 526
           r |  -.4626854   .5749059    -0.80   0.421    -1.593158    .6677
> 874
       ydr_1 |   .3163989   .0853952     3.71   0.000     .1484811    .4843
> 167
       ydr_2 |   .3806109   .0876499     4.34   0.000     .2082595    .5529
> 622
       _cons |   23.80395   9.362831     2.54   0.011      5.39324    42.21
> 466
-------------+-------------------------------------------------------------
> ---
     sigma_u |   9.860115
     sigma_e |  5.1515844
         rho |   .7855634   (fraction of variance due to u_i)
---------------------------------------------------------------------------
> ---
F test that all u_i=0:     F(26, 372) =    37.29             Prob > F = 0.0
> 000

STATA 自抽样中,请等待 ... ...

matsize too small
    You have attempted to create a matrix with too many rows or columns
    or attempted to fit a model with too many variables.  You need to
    increase matsize; it is currently 405.  Use set matsize; see help
    matsize.

    If you are using factor variables and included an interaction that
    has lots of missing cells, either increase matsize or set emptycells
    drop to reduce the required matrix size; see help set emptycells.

    If you are using factor variables, you might have accidentally
    treated a continuous variable as a categorical, resulting in lots of
    categories.  Use the c. operator on such variables.
r(908);

end of do-file

r(908);
按照您说的改了还是这样呀
二维码

扫码加我 拉你入群

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

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

2017-4-16 09:04:13
你可以用stata14了,自动管理matsize
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群