楼主: unsaidyang
3516 0

用stata做Monte Carlo simulation得出t值验证clt [推广有奖]

  • 1关注
  • 2粉丝

本科生

54%

还不是VIP/贵宾

-

威望
0
论坛币
94 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
2 点
经验
1597 点
帖子
71
精华
0
在线时间
128 小时
注册时间
2009-11-24
最后登录
2023-12-26

楼主
unsaidyang 发表于 2011-5-10 10:11:31 |AI写论文
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)请大侠们给出具体的命令好吗?

关键词:Monte Carlo Simulation ulation Carlo Stata Stata Simulation 回归 t值 验证CLT

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-21 01:50