如何在 R 中使用有限制的 SUR?

问题描述 投票:0回答:0

我使用 systemfit 包在 R 中运行了一个 SUR 模型,但我需要获取汇总结果并将其用于施加两个限制:

  1. 三个方程的截距之和应该等于24.
  2. 所有活动的每个解释变量的系数之和等于零。

如何运行具有这两个限制的 SUR 模型?

SUR estimates for 'eq1' (equation 1)
Model Formula: Y1 ~ X1

                    Estimate  Std. Error   t value
(Intercept)       8.12788487  1.22300735   6.64582
X1Rural          -1.03309385  0.38727326  -2.66761
X1chdlessthan6    1.67758437  0.39414610   4.25625




SUR estimates for 'eq2' (equation 2)
Model Formula: Y2 ~ X1

                   Estimate Std. Error  t value             Pr(>|t|)
(Intercept)       0.7163935  0.9913563  0.72264             0.470431
X1Rural          -0.7947226  0.3139194 -2.53161             0.011834
X1chdlessthan6   -0.5248445  0.3194905 -1.64275             0.101419


                    


SUR estimates for 'eq3' (equation 3)
Model Formula: Y3 ~ X1

                   Estimate Std. Error  t value               Pr(>|t|)
(Intercept)      19.9376084  1.5112688 13.19263 < 0.000000000000000222
X1Rural           0.3432570  0.4785531  0.71728             0.47372572
X1chdlessthan6   -1.3580186  0.4870459 -2.78828             0.00561697

                    

我试过

linearhypothesis
,但我收到一条错误消息
The hypothesis "Y1_(Intercept)+Y2_(Intercept)+Y3_(Intercept)=24" is not well formed: contains bad coefficient/variable names.

r restriction linearhypothesis seemingly-unrelated-regression
© www.soinside.com 2019 - 2024. All rights reserved.