全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2488 6
2013-11-27
式子很简单
y=B1+x^B2+u
这个怎么用stata做回归啊?我在网上找的是
nl (y={b1}+x^{B2})
可是stata给我回的是
. nl (y={b1}+x^{b2})
(obs = 1000)

Iteration 0:  cannot calculate derivatives
equation/system not identified
r(481);

实在没招了,救助!
二维码

扫码加我 拉你入群

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

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

全部回复
2013-11-27 10:28:22
急求啊
二维码

扫码加我 拉你入群

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

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

2013-11-27 10:33:14
你的数据问题

. webuse production

. nl ( lnoutput ={b1}+ labor ^{b2})
(obs = 100)

Iteration 0:  residual SS =  103.7422
Iteration 1:  residual SS =  91.29678
Iteration 2:  residual SS =   91.2566
Iteration 3:  residual SS =   91.2566
Iteration 4:  residual SS =  91.25659
Iteration 5:  residual SS =  91.25659
Iteration 6:  residual SS =  91.25659

      Source |       SS       df       MS
-------------+------------------------------         Number of obs =       100
       Model |  29.2542029     1  29.2542029         R-squared     =    0.2428
    Residual |  91.2565949    98  .931189744         Adj R-squared =    0.2350
-------------+------------------------------         Root MSE      =  .9649817
       Total |  120.510798    99  1.21728079         Res. dev.     =  274.6382

------------------------------------------------------------------------------
    lnoutput |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         /b1 |   2.022872   .0987243    20.49   0.000     1.826957    2.218787
         /b2 |     .31635   .0553361     5.72   0.000     .2065373    .4261626
------------------------------------------------------------------------------
  Parameter b1 taken as constant term in model & ANOVA table



随便找个数据执行,是没有问题的啊
二维码

扫码加我 拉你入群

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

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

2013-11-27 11:05:44
蓝色 发表于 2013-11-27 10:33
你的数据问题

. webuse production
谢谢!我知道问题在哪里了!我的数据是自己gen的
gen u=rnormal(0,1)
gen x=rnormal(0,sqrt(0.5))
gen B1=5
gen B2=8
gen y=B1+B2^x+u
然后我列式子的时候parameter那里把B1,B2填进去了,应该用新的parameter b1, b2。多谢了!
二维码

扫码加我 拉你入群

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

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

2013-11-27 11:17:38
蓝色 发表于 2013-11-27 10:33
你的数据问题

. webuse production
我错了……其实还是不行,这是我的code
clear
set ob 1000
gen ut=rnormal(0,1)
gen x=rnormal(0,sqrt(0.5))
gen B1=4
gen B2=7
gen y=B1+x^B2+u
nl (y={b0}+x^{b1})
二维码

扫码加我 拉你入群

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

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

2016-6-10 20:21:55
问题怎么解决的?我也遇到类似问题了,我是初学者!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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