全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3095 4
2013-07-17
在回归分析中,看到导师写的这段命令:
reg logincyr certifcted educ_hig educ_mid workexp workexpsq $demo $occup /**column3**/
其中:$demo $occup 代表什么意思呢? 特别是其中的$表示什么含义呢?
各位前辈,求教啊!
二维码

扫码加我 拉你入群

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

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

全部回复
2013-7-17 01:17:40
$的意思是定义该变量为全局变量,意思是这个变量可以被其他程序任意调用!但是如果没有global该变量,直接在变量前加上“$”,进行回归,则相当于忽略该变量!
二维码

扫码加我 拉你入群

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

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

2013-7-17 02:13:39
-------------------------------------------------------------------------------------------------------------
    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-7-20 13:46:10
hua2007 发表于 2013-7-17 01:17
$的意思是定义该变量为全局变量,意思是这个变量可以被其他程序任意调用!但是如果没有global该变量,直接在 ...
非常感谢您,我明白了
二维码

扫码加我 拉你入群

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

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

2013-7-20 13:48:16
蓝色 发表于 2013-7-17 02:13
------------------------------------------------------------------------------------------------ ...
感谢
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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