楼主: duanesummer
22163 10

[面板数据求助] 怎么对系数做T检验啊 [推广有奖]

  • 1关注
  • 2粉丝

已卖:168份资源

本科生

66%

还不是VIP/贵宾

-

威望
0
论坛币
194 个
通用积分
24.7522
学术水平
5 点
热心指数
10 点
信用等级
2 点
经验
418 点
帖子
108
精华
0
在线时间
47 小时
注册时间
2007-6-25
最后登录
2016-8-9

楼主
duanesummer 发表于 2014-3-18 06:28:20 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
数据分了2组,健康组和非健康组,做完了LOGIT regression以后,怎么对这两组数据中的每个变量的系数做T检验呢?

万分感谢啊,拜托大家了!
二维码

扫码加我 拉你入群

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

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

关键词:t检验 regression regressio regress logit 健康

沙发
jjjj6666 发表于 2014-3-18 08:31:33
I think you can compute Wald test, but a better option may be to run the whole data together by including interaction terms using the dummy of the group in the model?

藤椅
duanesummer 发表于 2014-3-19 05:58:30
jjjj6666 发表于 2014-3-18 08:31
I think you can compute Wald test, but a better option may be to run the whole data together by incl ...
但是现在需要对系数做T检验,导师没让我做别的检验。我知道怎么对样本做T检验,但是对系数的T检验真是一点都不会啊,您能告诉我从STATA的那里可以做嘛?我用的是LOGIT回归,在那个菜单选项里有关于这个检验的吗?多谢!

板凳
jjjj6666 发表于 2014-3-19 06:18:30
you can use this

(b1-b2)/sqrt(se(b1)^2+se(b2)^2)

where b1 is the coefficient from the 1st logit, b2 is the corresponding coefficient from the 2nd logit.  For logit, this will be z-statistics, not t, I think(?)

I still think running the model with interaction term is a better approach.

报纸
duanesummer 发表于 2014-3-20 02:41:58
jjjj6666 发表于 2014-3-19 06:18
you can use this

(b1-b2)/sqrt(se(b1)^2+se(b2)^2)
真的很感谢您的回复,我不怎么熟悉STATA的COMMENTS,您知道怎么用菜单方式实现这个命令吗?多谢!

地板
jjjj6666 发表于 2014-3-20 03:41:41
I think you need to use command window since you need to compute yourself, for example, if g is your group variable with 0 for one of the subgroup and 1 for the others,

* run 1st logit
logit y x if g==0
* record b and SE2
mat B1=e(b)
mat V1=e(V)

* run 2nd logit
logit y x if g==1
* record b and SE2
mat B2=e(b)
mat V2=e(V)

to test the difference of coefficient for x, we compute the p-value

local p=2*(1-normprob(abs(B1[1,1]-B2[1,1])/sqrt(V1[1,1]+V2[1,1])))
di `p'


7
jjjj6666 发表于 2014-3-20 10:49:12
or do another way, which is better by taking into consideration the estimates are from sub-samples :

logit y x if g==0
est store a
logit y x if g==1
est store b
suest
test [a_y]x = [b_y]x

8
duanesummer 发表于 2014-3-21 03:56:05
jjjj6666 发表于 2014-3-20 10:49
or do another way, which is better by taking into consideration the estimates are from sub-samples : ...
我昨天自己又查了些资料,觉得你说的interaction好像也不错的,这个用菜单的形式可以实现吗?

9
jjjj6666 发表于 2014-3-21 05:13:30
if using menu, under data->create or change data->other variable creation commands->interaction expansion

then depend on if the other variables are continuous, if continuous, select  I.varname1*varname3, select the variable for 健康组/非健康组 in the categorical variable, and the x (continuous) variable in continuous variable selection, click ok.  It will generate new variables named start with _I

Then run the logit reg by include all the new variables named as _I in addition to the variables you already used with robust SE

It will be easy to use command window as (if you do logit Y on x by group):

xi: logit Y x i.group*x, robust

and then test the interaction term

test _IgroXx_1



10
lzd1314 学生认证  发表于 2018-12-27 20:59:42
楼主你好,我想请问下你是怎么解决的,我也想检验两个回归系数是否有差异,我的是面板数据,好像用suest不行,请问怎样做t检验

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

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