全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
37708 14
2009-02-18
怎么用STATA做加权最小二乘法来降低异方差
二维码

扫码加我 拉你入群

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

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

全部回复
2009-2-18 20:08:00

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

二维码

扫码加我 拉你入群

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

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

2009-2-18 21:24:00

兄弟能不能说清楚点啊

不明白你的意思

wls,没有这个命令哦

二维码

扫码加我 拉你入群

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

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

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

二维码

扫码加我 拉你入群

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

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

2009-2-19 09:57:00

g id=_n

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

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

二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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