全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
9597 4
2011-04-22
悬赏 5 个论坛币 未解决
基于Hicks( 1937) , Blanchard and Fischer( 1993) , 以及Blanchard( 1997) , 设定IS􀀁LM 模型如下:
C = c11 + c12 Yd + 􀀁1
I = c21 + c22 Y+ c23 r + 􀀁2
Q = c31 + c32 Y + 􀀁3
r = c41 + c42 Y+ c43M1+ c44 Inf + 􀀁4
Yd= Y - T + TR = Y - tY+ TR
Y = C + I + G + X - Q
􀀁 􀀁 其中, Inf 为通货膨胀, cij 为待估参数, 􀀁为随机项,
这样然后用一个三阶的OLS,stata里面语句怎么编?
谢谢大家啊!!!!
本文来自: 人大经济论坛 Stata专版 版,详细出处参考:https://bbs.pinggu.org/viewthread.php?tid=1083303&page=1&from^^uid=1475565
二维码

扫码加我 拉你入群

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

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

全部回复
2011-4-22 12:31:23
看手册里面的例子,模仿去做吧

help reg3                                                                            dialog:  reg3               
                                                                                   also see:  reg3 postestimation
-----------------------------------------------------------------------------------------------------------------

Title

    [R] reg3 -- Three-stage estimation for systems of simultaneous equations


Syntax

    Basic syntax

        reg3 (depvar1 varlist1) (depvar2 varlist2) ...(depvarN varlistN) [if] [in] [weight]


    Full syntax

        reg3 ([eqname1:]depvar1a [depvar1b ...=]varlist1 [, noconstant])
              ([eqname2:]depvar2a [depvar2b ...=]varlist2 [, noconstant])
              ...
              ([eqnameN:]depvarNa [depvarNb ...=]varlistN [, noconstant])
              [if] [in] [weight] [, options]


    options                     description
    -----------------------------------------------------------------------------------------------------------
    Model
      ireg3                     iterate until estimates converge
      constraints(constraints)  apply specified linear constraints

    Model 2
      exog(varlist)             exogenous variables not specified in system equations
      endog(varlist)            additional right-hand-side endogenous variables
      inst(varlist)             full list of exogenous variables
      allexog                   all right-hand-side variables are exogenous
      noconstant                suppress constant from instrument list

    Est. method
      3sls                      three-stage least squares; the default
      2sls                      two-stage least squares
      ols                       ordinary least squares (OLS)
      sure                      seemingly unrelated regression estimation(SURE)
      mvreg                     sure with OLS degrees-of-freedom adjustment
      corr(correlation)         unstructured or independent correlation structure; default is unstructured

    df adj.
      small                     report small-sample statistics
      dfk                       use small-sample adjustment
      dfk2                      use alternate adjustment

    Reporting
      level(#)                  set confidence level; default is level(95)
      first                     report first-stage estimates
      nocnsreport               do not display constraints
      display_options           control spacing and display of omitted variables and base and empty cells

    Optimization
      optimization_options      control the optimization process; seldom used

    + noheader                  suppress display of header
    + notable                   suppress display of coefficient table
    + nofooter                  suppress display of footer
    + coeflegend                display coefficients' legend instead of coefficient table
二维码

扫码加我 拉你入群

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

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

2011-4-22 12:31:48
Examples

    -------------------------------------------------------------------------------------------------------------
    . webuse klein
    . reg3 (consump wagepriv wagegovt) (wagepriv consump govt capital1)
    -------------------------------------------------------------------------------------------------------------
    . webuse supDem
    . global demand "(qDemand: quantity price pcompete income)"
    . global supply "(qSupply: quantity price praw)"
    . reg3 $demand $supply, endog(price)
    -------------------------------------------------------------------------------------------------------------
    . webuse klein
    . 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"
    . reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) ireg3
    . global conseqn "(consump profits profits1 wagepriv wagegovt)"
    . constraint 1 [consump]wagepriv = [consump]wagegovt
    . reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) constr(1) ireg3
二维码

扫码加我 拉你入群

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

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

2011-4-22 13:16:04
谢谢啊
我先试试~~
可以再请教一个问题不?有命令可以在上三角输出变量的Spearman相关系数,下三角输出变量的Pearson相关系数不?

3# 蓝色
二维码

扫码加我 拉你入群

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

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

2011-4-22 14:32:21
339127095 发表于 2011-4-22 13:16 有命令可以在上三角输出变量的Spearman相关系数,下三角输出变量的Pearson相关系数不?
https://bbs.pinggu.org/thread-455856-1-1.html
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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