楼主: 苍穹皓月
5342 11

[面板数据求助] 用连玉君老师面板门槛模型出现错误 [推广有奖]

  • 1关注
  • 0粉丝

硕士生

3%

还不是VIP/贵宾

-

威望
0
论坛币
114 个
通用积分
3.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
182 点
帖子
17
精华
0
在线时间
242 小时
注册时间
2015-10-7
最后登录
2024-10-28

楼主
苍穹皓月 学生认证  发表于 2017-4-7 19:47:50 |AI写论文
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

关键词:面板门槛模型 面板门槛 连玉君 Categorical interaction 模型

沙发
优雅的胖子 在职认证  学生认证  发表于 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);
按照您说的改了还是这样呀

地板
austen06 发表于 2017-4-16 09:04:13
你可以用stata14了,自动管理matsize

7
我的时代007 发表于 2018-1-30 10:14:19
楼主,你的问题解决了吗?我也遇到同样情况了

8
Ilovesophie 发表于 2019-2-19 20:09:35
请问一下,使用xtthres命令回归结果里显示的中文都是乱码应该怎么办

9
meme180 学生认证  发表于 2020-3-22 17:50:19
请问这个min 的大小是怎么决定的呀,我的样本量是510 ,min(50)可以吗?

10
meme180 学生认证  发表于 2020-3-22 19:12:29
我 set matsize 11000,还是提示太小。。。。

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

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