公卫百科  > 所属分类  >  R/S+   
[0] 评论[0] 编辑

简单线性回归的实现

 You have two vectors, x and y, that hold paired observations: (x1, y1), (x2, y2), ..., (xn, 公卫考场

yn). You believe there is a linear relationship between x and y, and you want to create
a regression model of the relationship.
The lm function performs a linear regression and reports the coefficients:
公卫人

> lm(y ~ x)
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept)            x  
      17.72         3.25

附件列表


0

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

如果您认为本词条还有待完善,请 编辑

上一篇 绘制直方图    下一篇 多重线性回归的实现

同义词

暂无同义词