楼主: summerwin
4289 2

求助:stata里怎么做对系数有限制的回归? [推广有奖]

  • 0关注
  • 0粉丝

硕士生

30%

还不是VIP/贵宾

-

威望
0
论坛币
40 个
通用积分
2.0001
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1953 点
帖子
73
精华
0
在线时间
92 小时
注册时间
2008-3-19
最后登录
2022-12-30

楼主
summerwin 发表于 2010-9-27 11:21:04 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
如题,比如模型是y=a1x1+a2X2+a3x3+u,限制是a1=a2,这个回归的命令是什么呢?
谢谢了...
二维码

扫码加我 拉你入群

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

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

关键词:Stata tata 怎么做 求助 系数 Stata

沙发
蓝色 发表于 2010-9-27 12:41:32
[R] cnsreg -- Constrained linear regression


Syntax

        cnsreg depvar indepvars [if] [in] [weight] , constraints(constraints) [options]

    options                       description
    ---------------------------------------------------------------------------------------------------------------
    Model
    * constraints(constraints)    apply specified linear constraints
      noconstant                  suppress constant term

    SE/Robust
      vce(vcetype)                vcetype may be ols, robust, cluster clustvar, bootstrap, or jackknife

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

    + mse1                        force MSE to 1
    + coeflegend                  display coefficients' legend instead of coefficient table
    ---------------------------------------------------------------------------------------------------------------
    * constraints(constraints) is required.
    + mse1 and coeflegend do not appear in the dialog box.
    indepvars may contain factor variables; see fvvarlist.
    depvar and indepvars may contain time-series operators; see tsvarlist.
    bootstrap, by, jackknife, mi estimate, rolling, statsby, and svy are allowed; see prefix.
    vce(bootstrap) and vce(jackknife) are not allowed with the mi estimate prefix.
    Weights are not allowed with the bootstrap prefix.
    aweights are not allowed with the jackknife prefix.
    vce(), mse1, and weights are not allowed with the svy prefix.
    aweights, fweights, pweights, and iweights are allowed; see weight.
    See [R] cnsreg postestimation for features available after estimation.


Menu

    Statistics > Linear models and related > Constrained linear regression


Description

    cnsreg fits constrained linear regression models.  cnsreg typed without arguments redisplays the previous
    cnsreg results.


Options

        +-------+
    ----+ Model +--------------------------------------------------------------------------------------------------

    constraints(constraints), noconstant; see [R] estimation options.

        +-----------+
    ----+ SE/Robust +----------------------------------------------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which includes types that are derived from
        asymptotic theory, that are robust to some kinds of misspecification, that allow for intragroup
        correlation, and that use bootstrap or jackknife methods; see [R] vce_option.

        vce(ols), the default, uses the standard variance estimator for ordinary least-squares regression.

        +-----------+
    ----+ Reporting +----------------------------------------------------------------------------------------------

    level(#); see [R] estimation options.

    nocnsreport; see [R] estimation options.

    display_options:  noomitted, vsquish, noemptycells, baselevels, allbaselevels; see [R] estimation options.

    The following options are available with cnsreg but are not shown in the dialog box:

    mse1 is used only in programs and ado-files that use cnsreg to fit models other than constrained linear
        regression.  mse1 sets the mean squared error to 1, thus forcing the variance-covariance matrix of the
        estimators to be (X'DX)^-1 (see Methods and formulas in [R] regress) and affecting calculated standard
        errors.  Degrees of freedom for t statistics are calculated as n rather than n-p+c, where p is the total
        number of parameters (prior to restrictions and including the constant) and c is the number of constraints.

        mse1 is not allowed with the svy prefix.

    coeflegend; see [R] estimation options.


Examples

    . sysuse auto
    . constraint 1 price = weight
    . cnsreg mpg price weight, constraints(1)

    . constraint 2 displ = weight
    . constraint 3 gear_ratio = -foreign
    . cnsreg mpg price weight displ gear_ratio foreign length, c(1-3)

    . constraint 99 _cons = 0
    . cnsreg mpg price weight displ gear_ratio foreign length, c(1-3,99)

藤椅
ywh19860616 发表于 2010-9-27 15:57:37
版主,这个好像只是截面数据或者时序数据,那面板数据时用什么命令?怎么处理

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

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