我知道标题没有确切说明我的意思,所以让我在这里解释一下。 我在一个数据集上工作,该数据集由给定某种小麦类型(A,B,C,D)的小麦产量组成。现在我在拟合线性模型时的问题是我要拟合:

lm1 = lm(yield ~ type), when doing so R commits the first wheat type(A) and marks it as a global intercept and then estimates influence of all other types on the yield. I know that I can fit a linear model like such: lm2 = lm(yield ~ 0 + type) which will give me estimates of the influence of each type on the yield however what I really want to see is a sort of combination of the two of them.

Is there an option to fit a linear model in R s.t lm3 = lm(yield ~ GlobalIntercept + type) where GlobalIntercept would represent the general intercept of my linear model and then I could see the influence of each type of wheat on that general intercept. So kind of like in the first model though this time we'd estimate the influence of all types of wheat (A,B,C,D) on the general yield.