全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
10741 6
2010-03-29
在stata8里我写的是这个sw reg y x1 x2,fe(1.5) fs(1.5),但每次都出现如下错误:
fe(1.5) fs(1.5) not allowed,
r(198);
恳忘高人指点啊,万分感谢!!!
二维码

扫码加我 拉你入群

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

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

全部回复
2010-3-29 13:03:50
继续期待……
二维码

扫码加我 拉你入群

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

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

2010-3-29 13:29:45
--------------------------------------------------------------------------------------------------------------------
help for sw                                                                                          manual:  [R] sw
                                                                                                     dialog:  sw   
--------------------------------------------------------------------------------------------------------------------

Stepwise estimation

        sw cmd term [term ...] [weight] [if exp] [in range], { pr(#) | pe(#) | pr(#) pe(#) } [ forward lr hier
                    lockterm1 cmd_options ]

    where term is either a varname or (varlist) (a varlist in parentheses, indicating that this group of variables
    are to be included or excluded together) and cmd is one of


没有你的那个选项啊
二维码

扫码加我 拉你入群

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

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

2010-3-29 14:02:50
首先,还是先谢谢你。我是在一个教程上看到的,逐步回归命令如下:
stepwise  因变量   变 量1 变 量2 变 量m,ba  forw  st fe(#)  fs(#)
例如:stepwise  y x1 x2 x3, fe(1.5) fs(1.5);
自己也不是学经济金融的,所以跟前也没人懂,在网上查了一下,说stata8的逐步回归命令前面应该是sw cmd……这种格式,但还是搞不清具体命令是啥
二维码

扫码加我 拉你入群

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

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

2010-3-29 14:15:09
刚开始学,看的教程好像和现有的软件不配套,还想问问斑竹:
{ pr(#) | pe(#) | pr(#) pe(#) } [ forward lr hier lockterm1 cmd_options ]
后面的命令都怎么解释啊??(我就知道forward是啥意思,哎)谢谢!
二维码

扫码加我 拉你入群

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

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

2010-3-29 16:00:34
--------------------------------------------------------------------------------------------------------------------
help for sw                                                                                          manual:  [R] sw
                                                                                                     dialog:  sw   
--------------------------------------------------------------------------------------------------------------------

Stepwise estimation

        sw cmd term [term ...] [weight] [if exp] [in range], { pr(#) | pe(#) | pr(#) pe(#) } [ forward lr hier
                    lockterm1 cmd_options ]

    where term is either a varname or (varlist) (a varlist in parentheses, indicating that this group of variables
    are to be included or excluded together) and cmd is one of

        clogit | cloglog | cnreg | glm | logistic | logit | nbreg | ologit | oprobit | poisson | probit | qreg |
        regress | stcox | streg | tobit

    For example

        . sw regress mpg weight displ, pr(.2)

    would perform backward-selection linear regression.

    by ... : may be used with sw; see help by.

    Weights are allowed if cmd allows them.

    sw shares the features of all estimation commands; see help estcom.

    predict after sw behaves the same as predict after the particular estimation command; see help for the
    particular estimation command for details.


Description

    sw performs stepwise estimation, the flavor of which is determined by the options specified:

        pr(#)                 backward selection
        pr(#) hier            backward hierarchical selection
        pr(#) pe(#)           backward stepwise

        pe(#)                 forward selection
        pe(#) hier            forward hierarchical selection
        pr(#) pe(#) forward   forward stepwise


Options

    pr(#) specifies the significance level for removal from the model; terms with p>=pr() are eligible for
        removal.

    pe(#) specifies the significance level for addition to the model; terms with p<pe() are eligible for addition.

    forward specifies the forward-stepwise method when both pr() and pe() are also specified.  Specifying both
        pr() and pe() without forward results in backward stepwise.  Note that specifying only pr() results in
        backward selection and specifying only pe() results in forward selection.

    lr specifies the test of term significance is to be the likelihood-ratio test.  The default is the less
        computationally expensive Wald test.

    hier specifies hierarchical selection.

    lockterm1 specifies that the first term is to be included in the model and not subjected to the selection
        criteria.

    cmd_options refers to any of the options of the estimation command.  sw operates by iterating the estimation
        command to obtain results.


Examples

    . sw reg price mpg weight displ, pr(.2)
    . sw reg price mpg weight displ (r1-r4), pr(.2)
    . sw reg price mpg weight displ (r1-r4), pr(.2) hier
    . sw reg price mpg (weight displ) (r1-r4), pr(.2) hier

    . sw logit outcome (sex weight) treated1 treated2, pr(.2)
    . sw logit outcome (sex weight) treated1 treated2, pr(.2) lockterm1

    . sw


Also see

    Manual:  [U] 23 Estimation and post-estimation commands,
             [U] 29 Overview of Stata estimation commands,
             [R] sw

    Online:  help for estcom, postest;
             help for the commands listed below the syntax diagram.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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