#8.1(1)
load('C:/exercise/ch8/exercise8_1.RData')
attach(exercise8_1)
#boxplot(exercise8_1$填装量~机器,col="gold",xlab="机器",ylab="填充量")
my_summary<-function(x){
with(x,data.frame("均值"=mean(填装量),"标准差"=sd(填装量),n=length(填装量)))}
install.packages('plyr')
library(plyr)
ddply(exercise8_1,.(机器),my_summary)
model_1w<-aov(填装量~机器)
summary(model_1w)
#p=0.0135>0.01 接受原假设 ,没有证据显示机器对填装量有显著影响。
#model_1w$coefficients
#install.packages("gplots")
#library(gplots)
#plotmeans(填装量~机器,data=exercise8_1)
#(2)
install.packages("DescTools")
library(DescTools)
model_1w<-aov(填装量~机器)
EtaSq(model_1w,anova&#
统计学基于r语言第八章答案
最新推荐文章于 2022-01-06 13:51:58 发布