准备阶段多元线性回归.pdf

一、准备阶段 本次实验主要考虑影响大倪体重各体型指标的因素。我们的数据收集了112组大鲵的体重(weight) 、全 长(tl) 、体长(bl) 、头长(hl) 、体高(h) 、体宽(w) 、尾柄长(cl)和肠长(sl) 。 利用统计软件R来实现,其中用到的包有 readxl ,  dplyr ,  ggplot2 ,  car 。 library(readxl) library(dplyr) library(ggplot2) library(car) 首先,利用 read_excel 语句导入数据为新的数据框 ,并利用 str() 函数展示一下大致的数据结构。 df tbl_df(read_excel(/path/to/data.xls)) str(df) Classes ‘tbl_df’, ‘tbl’ and data.frame: 112 obs. of 8 variables: $ weight: num 2.3 2.4 2.5 2.7 2.8 3 3.2 3.4 3.5 3.6 ... $ tl : num 5.7 5.73 5.9 6.12 6.2 ... $ bl : num 4.9 4.53 4.65 4.85 5.1 5 5.1 6.25 5.25

文档评论(0)

1亿VIP精品文档

相关文档