实验设计与分析(第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)

相关推荐
污斑兔15 小时前
技术随笔:Node.js ESM 中巧用 `-r dotenv/config` 解决环境变量异步加载问题
开发语言·r语言·node.js
兮兮能吃能睡2 天前
R语言众数函数分析
开发语言·r语言
追风少年ii2 天前
脚本更新--CosMx、Xenium的邻域通讯分析(R版本)
linux·python·r语言·r·单细胞·培训
Q一件事2 天前
R语言随机森林分析显示R方和P值
开发语言·随机森林·r语言
生物小卡拉2 天前
指定列交集内容合并-Rscript_v1.0
笔记·学习·r语言
数据科学作家3 天前
如何入门python机器学习?金融从业人员如何快速学习Python、机器学习?机器学习、数据科学如何进阶成为大神?
大数据·开发语言·人工智能·python·机器学习·数据分析·统计分析
Tiger Z3 天前
《R for Data Science (2e)》免费中文翻译 (第11章) --- Communication(1)
r语言·数据科学·中文翻译
zhangfeng11333 天前
在 R 医学数据分析中,关于 RStudio 和 VSCode 哪个效率更高
vscode·数据分析·r语言
十三画者5 天前
【文献分享】acmgscaler:用于在 ACMG/AMP 框架内对基因层面的变异效应得分进行标准化校准。
数据挖掘·数据分析·r语言
小火柴1236 天前
利用R绘制条形图
开发语言·r语言