全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
4229 3
2013-03-24
我想用一个命令做GMM估计,但是矩条件很长很长,我想用一个短的变量代替
例如用aa代替"asdfadsfasdfasdfasdfsadf"

然后我在命令字使用aa:
gmm (aa),inst (L1.m L2.ik L2.wnf) winitial(identity) wmat(hac nw opt) twostep

aa的那个地方实际上用那个字符串代替
应该怎么做呢?谢谢哦

二维码

扫码加我 拉你入群

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

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

全部回复
2013-3-24 21:59:59
求助呀。。。
二维码

扫码加我 拉你入群

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

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

2013-3-25 00:01:07

Examples

    ---------------------------------------------------------------------------------------------------------------
    Setup
        . webuse klein

    Estimate system by three-stage least squares
        . reg3 (consump wagepriv wagegovt) (wagepriv consump govt capital1)

    ---------------------------------------------------------------------------------------------------------------
    Setup
        . webuse supDem

    Store equations in global macros
        . global demand "(qDemand: quantity price pcompete income)"
        . global supply "(qSupply: quantity price praw)"

    Estimate system, specifying price as endogenous
        . reg3 $demand $supply, endog(price)

    ---------------------------------------------------------------------------------------------------------------
    Setup
        . webuse klein

    Store equations and variable lists in global macros
        . global conseqn "(consump profits profits1 wagetot)"
        . global inveqn "(invest profits profits1 capital1)"
        . global wageqn "(wagepriv totinc totinc1 year)"
        . global enlist "wagetot profits totinc"
        . global exlist "taxnetx wagegovt govt"

    Estimate system, specifying lists of endogenous and exogenous variables; iterate until estimates converge
        . reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) ireg3

    Modify consumption equation
        . global conseqn "(consump profits profits1 wagepriv wagegovt)"

    Constrain coefficients of wagepriv and wagegovt in consumption equation to be equal
        . constraint 1 [consump]wagepriv = [consump]wagegovt

    Estimate system under constraint
        . reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) constr(1) ireg3
二维码

扫码加我 拉你入群

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

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

2013-3-25 13:44:35
蓝色 发表于 2013-3-25 00:01
Examples

    ---------------------------------------------------------------------------------- ...
非常感谢版主,谢谢
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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