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

相关推荐
大千AI助手7 小时前
残差:从统计学到深度学习的核心概念
人工智能·深度学习·resnet·统计学·方差分析·残差·残差分析
WangYan202213 小时前
R语言:数据读取与重构、试验设计(RCB/BIB/正交/析因)、ggplot2高级绘图与统计检验(t检验/方差分析/PCA/聚类)
r语言·ggplot2·dplyr
zhangfeng11331 天前
错误于make.names(vnames, unique = TRUE): invalid multibyte string 9 使用 R 语言进行数据处理时
开发语言·r语言·生物信息
zhangfeng11331 天前
R geo 然后读取数据的时候 make.names(vnames, unique = TRUE): invalid multibyte string 9
开发语言·chrome·r语言·生物信息
梦想的初衷~2 天前
R语言生物群落数据分析全流程:从数据清洗到混合模型与结构方程
机器学习·r语言·生态·环境
没有梦想的咸鱼185-1037-16634 天前
基于R语言机器学习方法在生态经济学领域中的实践技术应用
开发语言·机器学习·数据分析·r语言
zhangfeng11334 天前
R 语法高亮为什么没有,是需要安装专用的编辑软件,R语言自带的R-gui 功能还是比较简单
开发语言·r语言
WangYan20224 天前
经济学+机器学习+R语言:十大原理、熵权法、随机森林、神经网络、因果推断全解析
r语言·生态经济学·经济学
高-老师5 天前
基于R语言的物种气候生态位动态量化与分布特征模拟
开发语言·r语言·物种气候
Tiger Z5 天前
R 语言科研绘图 --- 其他绘图-汇总2
r语言·论文·科研·绘图·研究生