R中回归系数的线性组合 [英] Linear combination of regression coefficients in R
本文介绍了R中回归系数的线性组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在R中使用变量X1,X2和X3进行多元回归,其中变量θ=β2+β3.因此对于X2的系数,我需要使用(θ-β3)来代替β2.我该怎么办?
I need to run a multiple regression in R, with the variables X1, X2 and X3, where there is a variable θ = β2 + β3. So instead of β2, for the coefficient of X2 I need to use (θ - β3). How could I do this?
推荐答案
请注意,Y = b1 * x1 +(t-b3)* x2 + b3 * x3
Note that Y = b1 * x1 + (t - b3) * x2 + b3 * x3
等同于
Y = b1 * x1 + t * x2-b3 * x2 + b3 * x3 = b1 * x1 + t * x2 + b3 *(x3-x2)
Y = b1 * x1 + t * x2 - b3 * x2 + b3 * x3 = b1 * x1 + t * x2 + b3 * (x3 - x2)
因此,您可以轻松地从那里继续.
So, you can continue from there easily.
这篇关于R中回归系数的线性组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文