实验设计与分析(第6版,Montgomery)第3章单因子实验:方差分析3.11思考题3.6 R语言解题

本文是实验设计与分析(第6版,Montgomery著,傅珏生译) 第3章单因子实验:方差分析3.11思考题3.6 R语言解题。主要涉及单因子方差分析,正态性假设检验,残差与拟合值的关系图,TukeyHSD法。

(a) Is there evidence to indicate that dosage level affects bioactivity? Use α = 0.05.

X<-c(24,28,37,30,37,44,31,35,42,47,52,38)

A<-factor(rep(1:3, each=4))

miscellany<-data.frame(X,A)

aov.mis<-aov(X~A, data=miscellany)

> summary(aov.mis) Df Sum Sq Mean Sq F value Pr(>F)

A 2 450.7 225.33 7.036 0.0145 *

Residuals 9 288.2 32.03


Signif. codes:

0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There appears to be a different in the dosages.

(b) If it is appropriate to do so, make comparisons between the pairs of means. What conclusions can you draw?

> TukeyHSD(aov.mis)

Tukey multiple comparisons of means

95% family-wise confidence level

Fit: aov(formula = X ~ A, data = miscellany)

$A

diff lwr upr p adj

2-1 7 -4.172869 18.17287 0.2402975

3-1 15 3.827131 26.17287 0.0114434

3-2 8 -3.172869 19.17287 0.1680265

Because there appears to be a difference in the dosages, the comparison of means is appropriate.

opar <- par(mfrow=c(2,2),cex=.8)

plot(aov.mis)

par(opar)

相关推荐
LabEx1 天前
科研数据可视化核心技术:基于 AI 与 R 语言的热图、火山图及网络图绘制实践指南
人工智能·信息可视化·r语言·r语言绘图·乐备实·labex·科研数据绘图
Jet45051 天前
第100+43步 ChatGPT学习:R语言实现特征选择曲线图
学习·chatgpt·r语言
Chef_Chen2 天前
从0开始学习R语言--Day40--Kruskal-Wallis检验
开发语言·学习·r语言
quant_19862 天前
R语言如何接入实时行情接口
开发语言·经验分享·笔记·python·websocket·金融·r语言
小白学大数据3 天前
R语言爬虫实战:如何爬取分页链接并批量保存
开发语言·爬虫·信息可视化·r语言
开开心心_Every4 天前
便捷的Office批量转PDF工具
开发语言·人工智能·r语言·pdf·c#·音视频·symfony
Chef_Chen6 天前
从0开始学习R语言--Day39--Spearman 秩相关
开发语言·学习·r语言
q567315237 天前
R语言初学者爬虫简单模板
开发语言·爬虫·r语言·iphone
shootero@126.com8 天前
R语言开发记录,二(创建R包)
r语言
shootero@126.com9 天前
R语言开发记录,一
开发语言·r语言