全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3471 0
2011-05-10
悬赏 68 个论坛币 未解决
Do a Monte Carlo experiment by following the following procedure
let b_0=b_1=1

step1) draw xi(i=1~n) from chisq distribution (df=4)
step2) draw u1i(i=1~n) from standard nomal distribution; u2i (i=1~n)from chisq distribution (df=1); u3i(i=1~n) from t distribution (df=2) (nsize=10)
step3) define yji=b_0+b_1xi+uji , for j=1,2,3
step4) OLS estimators for bhat _1with {(xi, y1i)}(i=1~n) is bhat_11,{(xi, y1i)}(i=1~n) is bhat_12,{(xi, y1i)}(i=1~n) is bhat_13
step5)compute tj =(bhat_1j - b_1)/s.e(bhat_1j) for j=1,2,3

repeat (step1)through (step5) b=10000 times so that you have 10000 many t1,t2,t3 for n=10,30,100.
compare the empirical pdf's of tj, j=1,2,3 with the pdf of N(0,1)

疑问:
1)怎样将stata中simulation的命令用于t值?
2)想在得出的t值的直方图上画上标准正太分布的pdf,以便做比较,是用hist ~~,norm freq吗?
3)stata做回归的时候,t值结果会自动保存为什么格式?比如系数为e(b),系数方差为e(v),那么t- value呢?需要自己generate  t=_b[x1]/_se[x1]才可以吗?
4)请大侠们给出具体的命令好吗?
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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