楼主: zyner
4291 3

[字符问题求助] 如何用变量代替一个字符串? [推广有奖]

  • 0关注
  • 1粉丝

游侠

已卖:48份资源

副教授

48%

还不是VIP/贵宾

-

威望
0
论坛币
2975 个
通用积分
8.9100
学术水平
6 点
热心指数
10 点
信用等级
1 点
经验
13810 点
帖子
439
精华
0
在线时间
1152 小时
注册时间
2008-2-11
最后登录
2021-4-7

楼主
zyner 发表于 2013-3-24 20:24:10 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我想用一个命令做GMM估计,但是矩条件很长很长,我想用一个短的变量代替
例如用aa代替"asdfadsfasdfasdfasdfsadf"

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

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

二维码

扫码加我 拉你入群

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

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

关键词:如何用 字符串 Identity Initial twostep identity 字符串 如何

沙发
zyner 发表于 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

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

    ---------------------------------------------------------------------------------- ...
非常感谢版主,谢谢

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-31 11:36