全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
6571 19
2013-06-19
如题,我安装了semipar这个指令,然后用它处理数据会出现——00000E,请问这是什么问题,能怎么解决。?

我用的command:

local x1 "lnpcx lnpcx2 lnz   inf_2r ch3_6r ch7_9r ch10_12r reg1-reg9 safenet sfd reside"
semipar prsonshr `x1', nonpar(totexpen)



数据在附件,谢谢帮忙测数据
data.xlsx
大小:(865.34 KB)

 马上下载




二维码

扫码加我 拉你入群

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

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

全部回复
2013-6-19 13:12:15
这我不晓得,我用过Stata的semipar,没问题,但使用这主要是拿来与R的结果比较。
您看要不要提供部份数据供大家测试,这样会比较知道问题所在。

是的,xtsemipar是处理面板数据的。
顺带一提,第一作者的semipar是在2011年约圣诞节放上去的,作者年龄不大,看起来很害羞【我老师评语】。
二维码

扫码加我 拉你入群

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

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

2013-6-19 13:21:51
h3327156 发表于 2013-6-19 13:12
这我不晓得,我用过Stata的semipar,没问题,但使用这主要是拿来与R的结果比较。
您看要不要提供部份数据供 ...
谢谢您,但我不知道如何提供部分数据,如何在这个地方提供数据?
二维码

扫码加我 拉你入群

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

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

2013-6-19 13:27:37
chtliu 发表于 2013-6-19 13:21
谢谢您,但我不知道如何提供部分数据,如何在这个地方提供数据?
……

把您的部份数据,存成 excel 档,或压缩成 .rar 档,

在您的帖子上面,点 下方 "编辑"  再点选 "附件" ……

祝 好运

现在我不会帮您测, 因为等下要上课, 晚上才有空。
二维码

扫码加我 拉你入群

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

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

2013-6-19 13:29:02
semipar命令安装的时候有一个do文件
是用的模拟数据


**PLREG vs SEMIPAR

clear
set seed 123
set obs 300
set matsize 5000
set more off
gen x1=round(uniform()*20)-10


drawnorm x2 x3 e y
gen x12=x1^2
matrix B1=(0,0)
matrix B2=(0,0)

forvalues i=1(1)1000 {
display in r `i'
replace e=invnorm(uniform())
replace e = e/sqrt(10)
replace y=x1+x2+x3+x12+e

qui plreg y x2 x3, nlf(x1) order(10) nograph
matrix BPLS=e(b)
matrix B1=(B1\BPLS)

qui semipar y x2 x3, nonpar(x1) nograph
matrix BSEMIPAR=e(b)
matrix B2=(B2\BSEMIPAR)
}

matrix B1=B1[2...,1...]
matrix B2=B2[2...,1...]

matrix BiasPLREG  =B1-J(rowsof(B1),colsof(B1),1)
matrix BiasSEMIPAR=B2-J(rowsof(B2),colsof(B2),1)

matrix list BiasPLREG
matrix list BiasSEMIPAR

mata: BiasPLREG  =st_matrix("BiasPLREG")
mata: BiasSEMIPAR=st_matrix("BiasSEMIPAR")
mata: mean(BiasPLREG)
mata: mean(BiasSEMIPAR)


mata: mean(BiasPLREG)  :^2+diagonal(variance(BiasPLREG))'
mata: mean(BiasSEMIPAR):^2+diagonal(variance(BiasSEMIPAR))'

** Application of the paper


use http://fmwww.bc.edu/ec-p/data/wooldridge/hprice3, clear
set seed 123
semipar  lprice  ldist larea lland  rooms baths age, nonpar(linst) xtitle(linst) ci
semipar  lprice  ldist larea lland  rooms baths age, nonpar(linst) nograph test(2)
semipar  lprice  ldist larea lland  rooms baths age, nonpar(linst) nograph test(3)  
二维码

扫码加我 拉你入群

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

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

2013-6-19 13:30:18
h3327156 发表于 2013-6-19 13:12
这我不晓得,我用过Stata的semipar,没问题,但使用这主要是拿来与R的结果比较。
您看要不要提供部份数据供 ...
我到这个作者的主页看过,好像是一个大叔,大胡子,头发不多,您老师难道见过他? 这么说您是留学生?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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