楼主: hanting
37025 21

[回归分析求助] 请教:STATA软件该如何进行岭回归分析 [推广有奖]

  • 0关注
  • 0粉丝

初中生

66%

还不是VIP/贵宾

-

威望
0
论坛币
279 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
144 点
帖子
18
精华
0
在线时间
14 小时
注册时间
2005-10-25
最后登录
2014-5-22

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请教:STATA软件该如何进行岭回归分析
二维码

扫码加我 拉你入群

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

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

关键词:stata软件 Stata 回归分析 tata 岭回归 软件 Stata 回归分析

沙发
hanting 发表于 2005-10-26 19:59:00 |只看作者 |坛友微信交流群
还有问题要问:用岭回归修正后是否还能做其它计量经济检验和诊断

使用道具

藤椅
minixi 发表于 2005-10-27 04:25:00 |只看作者 |坛友微信交流群

在Stata中搜索ridge regression,有几个ado文件可供参考。

[此贴子已经被作者于2005-10-27 4:44:26编辑过]

已有 1 人评分经验 收起 理由
SpencerMeng + 100 热心帮助其他会员

总评分: 经验 + 100   查看全部评分

使用道具

板凳
minixi 发表于 2005-10-27 04:38:00 |只看作者 |坛友微信交流群

help for rxrmaxl STB-28: sg45 ------------------------------------------------------------------------------

Generalized ridge regression: shrinkage extent ----------------------------------------------

rxrmaxl depvar varlist [if exp] [in range]

[, msteps(#) omdmin(#) qshape(#) rescale(#) tol(#) ]

To reset problem-size limits, see help matsize.

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

rxrmaxl calculates three normal-theory, maximum-likelihood criteria (classical, empirical Bayes, and random coefficients) for a choice of shrinkage extent in the ridge regression of depvar on varlist.

Options -------

msteps(#) specifies the number of steps per unit increase in MCAL, the multi- collinearity allowance parameter; the default value is 4. The total numbe > r of steps along the generalized shrinkage path from the least squares solu- tion (MCAL=0) to all zero coefficients (MCAL=p) will thus be 1+(msteps*p).

omdmin(#) is the strictly positive minimum value to be used for calculation of (1-delta) shrinkage factors. The default is 10e-13.

qshape(#) controls the shape (or curvature) of the generalized shrinkage path through likelihood space; the default value is 0, which yields Hoerl- Kennard "ordinary" ridge regression. qshape=1 yields uniform shrinkage, and all qshape values between -5 and 5 are allowed.

rescale(#) controls the scaling of the response variable and all p predictor variables in the varlist. The default value is rescale=1 to scale all centered variables to have sample variance 1. rescale=0 should be specified to retain the original scalings.

tol(#) specifies search convergence criterion and defaults to 0.01.

Example -------

. rxrmaxl mpg cylnds cubins hpower weight, q(-1)

Author ------

Robert L. Obenchain Eli Lilly and Company

Also see --------

STB: STB-28 sg45 On-line: help for rxridge and rxrcrlq

已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Stakiny + 1 + 1 + 1 热心帮助其他会员

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

使用道具

报纸
hanting 发表于 2005-10-27 07:49:00 |只看作者 |坛友微信交流群

谢谢minixi,这几个语法我也琢磨了好几天了,但还是没看懂。好象和别的软件的ridge regression计算不一样。我的问题的缘由是这样的:投了一篇外刊,现修回重改。原论文设计的回归模型的几个变量存在多重共线性,原来的做法是将膨胀因子大的变量剔除,但这样一来许多重要的变量都删除了,无法表达原有的意思,现在想通过岭回归的方法优化原模型,减小多重共线性,然后再做其它必要的检验。

现在的问题是:一是不知道如何用STATA中的岭回归语法,二是不知道如何提取出优化后的数据做各种必要的计量经济检验

使用道具

地板
tomhanks 发表于 2010-4-10 09:08:45 |只看作者 |坛友微信交流群
5# hanting



----------------------------------------------------------------------------
---------------------------------
package sg45 from
http://www.stata.com/stb/stb28
----------------------------------------------------------------------------
---------------------------------
TITLE
      STB-28 sg45.  Maximum likelihood ridge regression.
DESCRIPTION/AUTHOR(S)
      STB insert by
      Robert L. Obenchain,
      Eli Lilly and Company.
      Support:  317-276-3150
   
After installation, see help rxrcrlq, help rxridge, help
      rxrmaxl, help rxrmkdta, help rxrrisk, and help rxrsimu.

INSTALLATION FILES                                  (click here to install)
      sg45/rxrcrlq.ado
      sg45/rxrcrlq.hlp
      sg45/rxridge.ado
      sg45/rxridge.hlp
      sg45/rxrmaxl.ado
      sg45/rxrmaxl.hlp
      sg45/rxrmkdta.ado
      sg45/rxrmkdta.hlp
      sg45/rxrrisk.ado
      sg45/rxrrisk.hlp
      sg45/rxrsimu.ado
      sg45/rxrsimu.hlp
ANCILLARY FILES                                     (click here to get)
      sg45/haldcemt.dta
----------------------------------------------------------------------------
---------------------------------
(click here to return to the previous screen)
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
472496481 + 1 + 1 + 1 精彩帖子
Stakiny + 1 + 1 + 1 热心帮助其他会员

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

使用道具

7
tomhanks 发表于 2010-4-10 09:11:10 |只看作者 |坛友微信交流群
-------------------------------------------------------------------------------------------------------------
help for rxridge                                        STB-28: sg45
-------------------------------------------------------------------------------------------------------------

Generalized ridge regression: trace displays
--------------------------------------------

        rxridge depvar varlist [if exp] [in range]

                [, msteps(#) qshape(#) rescale(#) tol(#) ]


To reset problem-size limits, see help matsize.


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

rxridge performs 2-parameter shrinkage regression of depvar on varlist
displaying traces of (1) fitted coefficients, (2) scaled mean squared errors,
(3) excess MSE eigenvalues, (4) inferior direction cosines, and (5) principal
axis shrinkage (delta) factors.


Options
-------

msteps(#) specifies the number of steps per unit increase in MCAL, the multi-
    collinearity allowance parameter; the default value is 4.  The total number
    of steps along the generalized shrinkage path from the least squares solu-
    tion (MCAL=0) to all zero coefficients (MCAL=p) will thus be 1+(msteps*p).

qshape(#) controls the shape (or curvature) of the generalized shrinkage
    path through likelihood space; the default value is 0, which yields Hoerl-
    Kennard "ordinary" ridge regression.  qshape=1 yields uniform shrinkage,
    and all qshape values between -5 and 5 are allowed.

rescale(#) controls the scaling of the response variable and all p
    predictor variables in the varlist.  The default value is rescale=1 to
    scale all centered variables to have sample variance 1.  rescale=0 should
    be specified to retain the original scalings.

tol(#) specifies search convergence criterion and defaults to 0.01.


Example
-------

. rxridge mpg cylnds cubins hpower weight, q(-1)


Author
------

        Robert L. Obenchain
        Eli Lilly and Company


Also see
--------

    STB:  STB-28 sg45
On-line:  help for rxrcrlq and rxrmaxl

使用道具

8
tomhanks 发表于 2010-4-10 09:12:36 |只看作者 |坛友微信交流群
-------------------------------------------------------------------------------------------------------------
help for rxrcrlq                                        STB-28: sg45
-------------------------------------------------------------------------------------------------------------

Generalized ridge regression: shrinkage shape
---------------------------------------------

        rxrcrlq depvar varlist [if exp] [in range]
                [, nq(#) qmax(#) qmin(#) rescale(#) tol(#) ]

To reset problem-size limits, see help matsize.

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

rxrcrlq uses classical, normal-theory, maximum-likelihood to identify the
shrinkage path of MSE optimal shape (or curvature) for generalized ridge
regression of depvar on varlist.


Options
-------

nq(#) specifies an integer number of qshape values to evaluate between qmin
    and qmax, inclusive.  The default value is 21, and nq cannot be reset to
    any integer value less than 9.

qmax(#) specifies the maximum qshape to evaluate.  The default value is 5,
    and qmax cannot be reset to any value less than 2.

qmin(#) specifies the minimum qshape to evaluate.  The default value is -5,
    and qmin cannot be reset to any value greater than -2.

rescale(#) controls the scaling of the response variable and all p
    predictor variables in the varlist.  The default value is rescale=1 to
    scale all centered variables to have sample variance 1.  rescale=0 should
    be specified to retain the original scalings.

tol(#) specifies search convergence criterion and defaults to 0.01.

Example
-------

. rxrcrlq mpg cylnds cubins hpower weight

Author
------

        Robert L. Obenchain
        Eli Lilly and Company


Also see
--------

    STB:  STB-28 sg45
On-line:  help for rxridge and rxrmaxl

使用道具

9
chuihui 发表于 2011-7-30 09:51:26 |只看作者 |坛友微信交流群
5# hanting
您好,看到你以前对stata岭回归语法的疑惑了,我现在不会,您搞懂了吗?教教我好吗?
不胜感激哦

使用道具

10
kk22boy 发表于 2011-8-1 08:24:32 |只看作者 |坛友微信交流群
可以的。ridge  命令
如果该贴对您有些许帮助,希望你能回复一下或者评一下热心指数!谢谢!

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 07:45