Help us understand the problem. What is going on with this article?

組み込みデータセットairqualityを使って重回帰

More than 1 year has passed since last update.

Rではlm関数を使って線形回帰を行うことができる。
今回はairqualityデータセットを使って
試しに使ってみる。

head(airquality)
Ozone Solar.R Wind Temp Month Day
1 41 190 7.4 67 5 1
2 36 118 8.0 72 5 2
3 12 149 12.6 74 5 3
4 18 313 11.5 62 5 4
5 NA NA 14.3 56 5 5
6 28 NA 14.9 66 5 6
Data=na.omit(airquality)
Data=subset(airquality,select=c(Ozone,Wind,Temp))
lm(Ozone~Wind+Temp,data=Data)

Call:
lm(formula = Ozone ~ Wind + Temp, data = Data)

Coefficients:
(Intercept) Wind Temp

-71.033 -3.055 1.840

syow0130
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away