全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3802 5
2013-12-02
大家好:
    想请教个问题,怎么用stata做LTS回归(least trimmed squares Rousseeuw1984)?
                                                                                                          谢谢!

二维码

扫码加我 拉你入群

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

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

全部回复
2013-12-2 16:58:07
自己下载robreg 命令看看是不是

help robreg
----------------------------------------------------------------------------------------------------

Title

    robreg -- Robust regression


Syntax

    MM-estimator

        robreg mm depvar varlist [if] [in] [, mm_options ]

    M-estimator

        robreg m depvar [varlist] [if] [in] [, m_options ]

    S-estimator

        robreg s depvar varlist [if] [in] [, s_options ]

    LMS/LQS/LTS-estimator

        robreg lms depvar varlist [if] [in] [, lqs_options ]
        robreg lqs depvar varlist [if] [in] [, lqs_options ]
        robreg lts depvar varlist [if] [in] [, lqs_options ]

    Replay syntax

        robreg [, level(#) ]


    mm_options            description
    ----------------------------------------------------------------------------------------------
    Main
      efficiency(#)       gaussian efficiency; # in 70(5)95; default is efficiency(85)
      bp(#)               breakdown point; # in .10(.05).50; default is bp(0.5)

    Biweight M-estimate
      k(#)                tuning constant; not allowed with efficiency()
      tolerance(#)        tolerance for IRWLS weights; default is tolerance(1e-6)
      iterate(#)          maximum number of iterations; default is iterate(16000)
      relax               continue even if convergence not reached
      generate(newvar)    store IRWLS weights
      replace             overwrite existing variable

    Initial S-estimate
      nsamp(#)            number of trial samples
      sopts(s_options)    additional options passed through to S-algorithm
      save(name)          save S-estimate

    Standard errors
      vce(norobust)       traditional standard errors
      norobust            synonym for vce(norobust)

    Reporting
      level(#)            set confidence level; default is level(95)
      first               display initial S-estimate
      nodots              suppress progress dots of S-estimate
      log                 display RWLS iteration log
    ----------------------------------------------------------------------------------------------


    m_options             description
    ----------------------------------------------------------------------------------------------
    Main
      huber               use Huber objective function; the default
      biweight            use biweight objective function; bisquare is a synonym
      efficiency(#)       gaussian efficiency; # in 70(5)95; default is efficiency(95)
      k(#)                tuning constant; not allowed with efficiency()

    IRWLS algorithm
      tolerance(#)        tolerance for IRWLS weights; default is tolerance(1e-6)
      iterate(#)          maximum number of iterations; default is iterate(16000)
      relax               continue even if convergence not reached
      generate(newvar)    store IRWLS weights
      replace             overwrite existing variable

    Initial estimate
      init(arg)           initial estimate; arg may be lav, ols, name, or .; default is init(lav)
      save(name)          save initial estimate

    Scale estimate
      scale(#)            provide preliminary scale estimate
      updatescale         update scale estimate in each iteration
      center              center residuals when computing scale

    Standard errors
      vce(norobust)       traditional standard errors
      vce(pv)             traditional standard errors using pseudo-values approach
      norobust            synonym for vce(norobust)
      nose                skip computation of standard errors

    Reporting
      level(#)            set confidence level; default is level(95)
      first               display initial estimate
      log                 display RWLS iteration log
    ----------------------------------------------------------------------------------------------


    s_options             description
    ----------------------------------------------------------------------------------------------
    Main
      bp(#)               breakdown point; # in .10(.05).50; default is bp(0.5)
      k(#)                tuning constant; not allowed with bp()

    Resampling algorithm
      nsamp(#)            number of trial samples
      alpha(#)            maximum risk of bad solution; default is alpha(0.01)
      epsilon(#)          maximum contamination fraction; default is epsilon(0.2)
      nkeep(#)            number of candidates to keep; default is nkeep(2)
      rsteps(#)           number of local improvement steps; default is rsteps(1)
      stolerance(#)       tolerance for scale estimate; default is stolerance(1e-6)
      siterate(#)         maximum number of iterations for scale estimate; default is
                            siterate(16000)
      tolerance(#)        tolerance for coefficient vector; default is tolerance(1e-6)
      iterate(#)          maximum number of RWLS iterations; default is iterate(16000)
      ssteps(#)           number of scale approximation steps; default is ssteps(1)
      generate(newvar)    store IRWLS weights
      replace             overwrite existing variable

    Standard errors
      vce(norobust)       traditional standard errors
      norobust            synonym for vce(norobust)
      nose                skip computation of standard errors

    Reporting
      level(#)            set confidence level; default is level(95)
      nodots              suppress progress dots
    ----------------------------------------------------------------------------------------------


    lqs_options           description
    ----------------------------------------------------------------------------------------------
    Main
    * bp(#)               breakdown point; # in (0,0.5]; default is bp(0.5)

    Resampling algorithm
      nsamp(#)            number of trial samples
      alpha(#)            maximum risk of bad solution; default is alpha(0.01)
      epsilon(#)          maximum contamination fraction; default is epsilon(0.2).
      generate(newvar)    store minimizing sample
      replace             overwrite existing variable

    Reporting
      nodots              suppress progress dots
    ----------------------------------------------------------------------------------------------
    * bp() is not allowed with robreg lms


Description

    robreg provides a number of robust estimators for linear regression models. The command
    accompanies Jann (2010), a survey paper on robust regression in a German handbook on social
    science data analysis.

    robreg mm fits the efficient high breakdown MM-estimator proposed by Yohai (1987). On the
    first stage, a high breakdown S-estimator is applied to estimate the residual scale and derive
    starting values for the coefficients vector. On the second stage, an efficient bisquare
    M-estimator is applied to obtain the final coefficient estimates.

    robreg m fits regression M-estimators (Huber 1973) using iteratively reweighted least squares
    (IRWLS).

    robreg s fits the high breakdown S-estimator introduced by Rousseeuw and Yohai (1984) using
    the fast algorithm proposed by Salibian-Barrera and Yohai (2006).

    robreg lms, robreg lqs, and robreg lts fit the least median of squares (LMS), least quantile
    of squares (LQS; a generalization of LMS), and the least trimmed squares (LTS) estimators
    (Rousseeuw and Leroy 1987). Estimation is carried out using simple resampling without local
    improvement (e.g. Rousseeuw and Leroy 1987:197). Computation of standard errors is not
    supported for LMS, LQS, and LTS.

    For a recent contribution of similar estimators in Stata also see Verardi and Croux (2009).
二维码

扫码加我 拉你入群

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

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

2013-12-2 17:25:38
蓝色 发表于 2013-12-2 16:58
自己下载robreg 命令看看是不是

help robreg
我试一下看看。谢谢!
二维码

扫码加我 拉你入群

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

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

2013-12-2 20:38:59
蓝色 发表于 2013-12-2 16:58
自己下载robreg 命令看看是不是

help robreg
您好,你说的方法我试了,但是lts回归输出的只有系数,没有p值,无法判断显著性水平,请问这个问题如何解决?谢谢!
二维码

扫码加我 拉你入群

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

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

2017-4-7 14:55:48
derricksi 发表于 2013-12-2 20:38
您好,你说的方法我试了,但是lts回归输出的只有系数,没有p值,无法判断显著性水平,请问这个问题如何解 ...
你好,请问你的问题解决了吗
二维码

扫码加我 拉你入群

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

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

2024-4-19 18:03:53
derricksi 发表于 2013-12-2 20:38
您好,你说的方法我试了,但是lts回归输出的只有系数,没有p值,无法判断显著性水平,请问这个问题如何解 ...
你好没有P值这个问题你解决了么
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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