解释R中的回归系数 [英] Interpreting regression coefficients in R

查看:381
本文介绍了解释R中的回归系数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将x * log(x)模型拟合到数据中.拟合成功完成,但是我很难解释所得的系数.这是我的代码的快照.

I'm trying to fit a x*log(x) model to the data. The fitting is performed successfully but I have difficulties in interpreting the resulting coefficients. Here a snapshot of my code.

x <- c(6, 11, 16, 21, 26, 31, 36, 41, 46, 51)
y <- c(5.485, 6.992, 7.447, 8.134, 8.524, 8.985, 9.271, 9.647, 10.561, 9.971)

fit <- lm(y ~ x*log(x))
coef(fit)
> (Intercept)           x      log(x)    x:log(x) 
3.15224227  0.10020022  1.12588040 -0.01322249

我应该如何解释这些系数?我们称它们为a,b,c,d.我应该将它们放在公式"x * log(x)"的何处?

How I should interpret these coefficients? Let's call them a,b,c,d. Where I should put them in the formula "x*log(x)"?

推荐答案

按照书面规定,您所适合的模型是

As written, the model you are fitting is

E(y) = a + b*x + c*log(x) + d*x*log(x)

如果您确实想拟合模型a + b*x*log(c*x),则需要弄清楚a + b*x*(log(c)+log(x)) = a + b*log(c)*x + b*x*log(x),拟合y ~ x + x:log(x),并相应地对参数进行反计算.

If you really did want to fit the model a + b*x*log(c*x) you would need to figure out that a + b*x*(log(c)+log(x)) = a + b*log(c)*x + b*x*log(x), fit y ~ x + x:log(x), and back-calculate the parameters accordingly.

或者您可能对y~I(x*log(x))感兴趣?

您实际上想要适合的模型是什么?

What is the model you actually want to fit?

这篇关于解释R中的回归系数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆