全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
649 0
2017-10-10
clear
set obs 1
gen xbheight=.
save tmp, replace

use tmp1, clear
keep if regression==1
qui {
levelsof id, local(levels)
preserve
foreach i of local levels {
    restore, preserve
        keep if id == `i'
        list hhid idind line height age  hnonmissing
        reg height age if badheight==0
    predict xbheight, xb
        keep id time age height xbheight
        append using tmp
        save tmp, replace
  }
  }
sort id time
drop if age==.
save tmp, replace

我删掉了快速回归看了一下,这个回归不会预测xbheight的值。是不是这个原因xbheight不会被写入tmp里面??
我换了个mac 版的stata14 是不是版本问题,代码也不一样了??

二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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