楼主: offandon
4993 1

[程序分享] stata的vselect的介绍 [推广有奖]

  • 4关注
  • 21粉丝

已卖:3242份资源

学科带头人

26%

还不是VIP/贵宾

-

威望
0
论坛币
46180 个
通用积分
90.9439
学术水平
52 点
热心指数
74 点
信用等级
53 点
经验
108375 点
帖子
2122
精华
0
在线时间
2047 小时
注册时间
2008-6-17
最后登录
2024-2-9

楼主
offandon 发表于 2013-7-30 17:25:44 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
该命令用于线性模型的变量筛选,命令很强大!
需要自行安装。
具体介绍见下
vselect -- Linear regression variable selection

Syntax
        vselect depvar indepvars [if] [in] [weight] [, fix(varlist) best backward forward r2adj aic aicc bic]
        fweights, aweights, and pweights are allowed; see weight.

Description
    vselect performs variable selection for linear regression.  Through the use of the Furnival-Wilson leaps-and-bounds algorithm,
    all-subsets variable selection is supported.  This is done when the user specifies the best option.  The stepwise methods, forward
    selection and backward elimination, are also supported (by specifying forward or backward).
    All-subsets variable selection provides the R^2 adjusted, Mallows's C, Akaike's information criterion, Akaike's corrected information
    criterion, and Bayesian information criterion for the best regression at each quantity of predictors.  For stepwise selection, the
    user must tell vselect which information criterion to use.
    The user may also specify a fixed predictor list in fix() that will be included in every model.

Options
    fix(varlist) fixes these predictors in every regression.
    best gives the best model for each quantity of predictors.
    backward selects a model by backward elimination.
    forward selects a model by forward selection.
    r2adj uses R^2 adjusted information criterion in stepwise selection.
    aic uses Akaike's information criterion in stepwise selection.
    aicc uses Akaike's corrected information criterion in stepwise selection.
    bic uses Bayesian information criterion in stepwise selection.

Examples
    . sysuse auto
    . regress mpg weight trunk length foreign
    . estat ic
    . vselect mpg weight trunk length foreign, best
    . regress mpg weight foreign length
    . estat ic
    . vselect mpg weight trunk length, fix(foreign) best
    . regress mpg foreign `r(best2)'
    . estat ic
    . vselect mpg weight trunk length foreign, forward aicc
    . vselect mpg weight trunk length foreign, backward bic
    . estat ic
    . webuse census13
    . generate ne = region == 1
    . generate n = region == 2
    . generate s = region == 3
    . generate w = region == 4
    . summarize medage
    . generate tmedage = (medage-r(mean))/r(sd)
    . generate tmedage2 = tmedage^2
    . vselect brate tmedage tmedage2 dvcrate n s w [aweight=pop], best fix(mrgrate)
    . regress brate mrgrate `r(best5)' [aweight=pop]
    . estat ic

Saved results
    vselect saves the following in r():
    Macros              
      r(bestK)       variable list of predictors from best K predictor model
      r(besti)       variable list of predictors from best i predictor model
      r(best1)       variable list of predictors from best 1 predictor model
      r(predlist)    variable list of predictors from the optimal model
    Matrices            
      r(info)        contains the information criteria for the best models

Authors
    Charles Lindsey
    StataCorp
    College Station, TX
    clindsey@stata.com
    Simon Sheather
    Department of Statistics
    Texas A&M University
    College Station, TX

Also see
    Article:  Stata Journal, volume 11, number 1: st0213_1,
              Stata Journal, volume 10, number 4: st0213

二维码

扫码加我 拉你入群

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

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

关键词:vselect Select Elect Stata tata 模型

已有 1 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
Sunknownay + 100 + 6 + 1 + 1 + 1 鼓励积极发帖讨论

总评分: 经验 + 100  论坛币 + 6  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

沙发
offandon 发表于 2013-7-30 17:28:45
自己先顶了。。。。。

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

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