实验设计与分析(第6版,Montgomery)第5章析因设计引导5.7节思考题5.13 R语言解题

本文是实验设计与分析(第6版,Montgomery著,傅珏生译) 第5章析因设计引导5.7节思考题5.13 R语言解题。主要涉及方差分析,正态假设检验,残差分析,交互作用图。

dataframe<-data.frame(

y=c(36,18,30,39,20,37,36,22,33,32,20,34),

column=gl(4,3,12),

row=gl(3,1,12))

summary (dataframe)

dataframe.aov2 <- aov(y~column+row,data=dataframe)

summary (dataframe.aov2)

> summary (dataframe.aov2)

Df Sum Sq Mean Sq F value Pr(>F)

column 3 28.9 9.64 2.006 0.214717

row 2 580.5 290.25 60.399 0.000106 ***

Residuals 6 28.8 4.81


Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

with(dataframe,interaction.plot(column,row,y,type="b",pch=19,fixed=T,xlab="column",ylab="y"))

plot.design(y~column*row,data=dataframe)

fit <-lm(y~column+row,data=dataframe)

anova(fit)

summary(fit)

par(mfrow=c(2,2))

plot(fit)

par(mfrow=c(2,2))

plot(as.numeric(dataframecolumn), fitresiduals, xlab="column", ylab="Residuals", type="p", pch=16)

plot(as.numeric(dataframerow), fitresiduals, xlab="row", ylab="Residuals", pch=16)

相关推荐
青春不败 177-3266-05201 天前
R语言与DSSAT作物模型
r语言·生态学·作物模型·数字农业·dssat模型·农业科学
asyxchenchong8881 天前
农业系统模拟APSIM全流程详解(气象/土壤/碳氮平衡/NG版本)附R批量处理代码
开发语言·r语言
idolao5 天前
R语言4.4.3统计分析软件安装教程:详细步骤+自定义安装路径(64位)
开发语言·r语言
做cv的小昊5 天前
【TJU】应用统计学——第四周作业(2.3 C-R不等式、2.4区间估计)
c语言·人工智能·算法·机器学习·数学建模·r语言·概率论
爱技术的阿呆7 天前
R code debug 和 study
开发语言·r语言
Q一件事8 天前
R语言制图-相关性及关系网络图
开发语言·r语言
weixin_446934038 天前
多分类暴露变量的亚组分析森林图功能上线了,R语言搞不了风暴统计平台一键搞定
人工智能·机器学习·分类·数据挖掘·r语言
天桥下的卖艺者8 天前
R语言使用TrialEmulation包快速进行数据模拟RCT研究(真实世界研究)
开发语言·r语言·模拟rct
Omics Pro8 天前
基因集(模块)活性量化:R语言+Java原生
大数据·开发语言·前端·javascript·数据库·r语言·aigc