楼主: mhzhou
37596 14

[回归分析求助] 怎么用STATA做加权最小二乘法来降低异方差 [推广有奖]

  • 0关注
  • 2粉丝

博士生

60%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
1.2147
学术水平
1 点
热心指数
1 点
信用等级
6 点
经验
1731 点
帖子
112
精华
0
在线时间
524 小时
注册时间
2009-2-6
最后登录
2022-2-18

楼主
mhzhou 发表于 2009-2-18 19:45:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
怎么用STATA做加权最小二乘法来降低异方差
二维码

扫码加我 拉你入群

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

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

关键词:加权最小二乘法 最小二乘法 Stata 最小二乘 tata

沙发
蓝色 发表于 2009-2-18 20:08:00

 你去查查wls0命令,这个的单独下载

藤椅
mhzhou 发表于 2009-2-18 21:24:00

兄弟能不能说清楚点啊

不明白你的意思

wls,没有这个命令哦

板凳
hanqing525 发表于 2009-2-19 01:46:00
reg y x1 x2 [aw=v], where v is the weight!

报纸
蓝色 发表于 2009-2-19 08:43:00

----------------------------------------------------------------------------------------------------------
help for wls0
----------------------------------------------------------------------------------------------------------

Weighted least squares regression
---------------------------------

 wls0 dvar ivars [if] [in], wvar(varlist) type(wlstype)
     [ noconst robust hc2 hc3 graph ]

Description
-----------

wls0 computes various weighted least squares regressions. 
     The command generates two variables _wls_wgt and
     _wls_res, the wls weights and residuals respectively.


Options
-------

wvar(varlist) variables in the weightling equation.

type(wlstype) the wls type.  The choices are:
    abse  - absolute value of residual
    absen - absolute value of residual, ala Neter et al
    e2    - residual squared
    loge2 - log residual squared
    xb2   - fitted value squared

noconst do not include a constant in the weighting equation.

robust using robust standard errors in the final regression.

graph plots the wls residuals vs fitted.


Examples
--------

 . wls0 exp age ownrent income incomesq, wvar(income incomesq) type(abse)
 . wls0 exp age ownrent income incomesq, wvar(income incomesq) type(abse) noconst


Author
------

      Philip B. Ender
      UCLA Department of Education
      UCLA Academic Technology Services
      ender@ucla.edu

已有 2 人评分学术水平 热心指数 信用等级 收起 理由
sfhsky + 1 精彩帖子
日新少年 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 2  热心指数 + 1  信用等级 + 1   查看全部评分

地板
sungmoo 发表于 2009-2-19 09:57:00

g id=_n

xtgls y x1-xn,i(id) p(h)

*可能达到目的(其中y是因变量,x1……xn是自变量)。 

7
deane163789 发表于 2011-2-20 11:11:58
wlso在那里下载啊

8
扣子87 发表于 2012-8-31 21:22:31
(2)纠正异方差的常用套路(构造h值)
reg y x1 x2 x3
predict u,resid
gen usq=u^2
gen logusq=log(usq)
reg logusq x1 x2 x3
predict  g
gen h=exp(g)
reg y x1 x2 x3 [aw=1/h]
异方差hausman检验:
reg y x1 x2 x3
est store A(将上述回归结果储存到A中)
reg y x1 x2 x3 [aw=1/h]
est store B
hausman A B

9
peyzf 发表于 2013-8-14 08:34:01
seems make sense. which one is  reasonable?

10
peyzf 发表于 2013-8-14 09:16:03
vwls  y x

y x [aw=weight]
是等价的吗?

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-5 22:11