Math 3080 § 1. Metal Rod Example: Name: Example

advertisement
Math 3080 § 1.
Metal Rod Example:
Name: Example
Treibergs
23 Factorial Experiment
Feb. 8, 2014
We describe a 23 experimental design with one replicate per cell. It comes from an experiment by
Heinrich, “Experimental Design: Applications to System Testing,” Quality Engineering1, (1989)
199-216, who tested the tensile strength of metal rods depending on manufacturing conditions.
Quoted from Levine, Ramsey and Smidt, Applied Statistics for Engineers and Scientists,Prentice
Hall, 2001.
Data Set Used in this Analysis :
# Math 3080 - 1
Metal Rod Data
Feb. 9, 2014
# Treibergs
#
# An experiment by Heinrich, "Experimental Design: Applications to System
# Testing," Quality Engineering 1, (1989) 199-216 tested the tensile
# strength of metal rods depending on manufacturing condidiont. Quoted from
# Levine, Ramsey and Smidt, Applied Statistics for Engineers and
# Scientists, Prentice Hall, 2001.
#
# Factors
(Levels)
# Temperature of the molten metal at start (300 F, 400 F)
# Pressure on the molten metal to force it through the die (40 psi, 70 psi)
# Amount of catalyst (20 rpm, 30 rpm)
#
"Temp" "Pressure" "Catalyst" "Tensile"
300 40 20 30
400 40 20 20
300 70 20 20
400 70 20 30
300 40 30 10
400 40 30 60
300 70 30 10
400 70 30 10
R Session:
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type ’license()’ or ’licence()’ for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type ’contributors()’ for more information and
1
’citation()’ on how to cite R or R packages in publications.
Type ’demo()’ for some demos, ’help()’ for on-line help, or
’help.start()’ for an HTML browser interface to help.
Type ’q()’ to quit R.
[R.app GUI 1.41 (5874) i386-apple-darwin9.8.0]
[History restored from /Users/andrejstreibergs/.Rapp.history]
> tt=read.table("M3082DataMetalRod.txt",header=T)
> attach(tt)
> tt
Temp Pressure Catalyst Tensile
1 300
40
20
30
2 400
40
20
20
3 300
70
20
20
4 400
70
20
30
5 300
40
30
10
6 400
40
30
60
7 300
70
30
10
8 400
70
30
10
> temp=ordered(Temp); pressure=ordered(Pressure); cat=ordered(Catalyst)
> ############ ANALYSIS OF VARIANCE ##################################
> a1=aov(Tensile~temp+pressure+cat)
> summary(a1)
Df Sum Sq Mean Sq F value Pr(>F)
temp
1 312.5
312.5 0.9259 0.3904
pressure
1 312.5
312.5 0.9259 0.3904
cat
1
12.5
12.5 0.0370 0.8568
Residuals
4 1350.0
337.5
>
>
>
>
>
>
################## INTERACTION AND DESIGN PLOTS ######################
layout(matrix(c(1,4,2,3),ncol=2))
interaction.plot(temp,pressure,Tensile,main="Interaction Plots")
interaction.plot(temp,cat,Tensile)
interaction.plot(pressure,cat,Tensile)
plot.design(Tensile~temp+pressure+cat)
2
> ############## TABLES OF MEANS AND EFFECTS ##########################
> model.tables(a1,"means")
Tables of means
Grand mean
23.75
temp
300 400
17.5 30.0
pressure
40
70
30.0 17.5
cat
20
30
25.0 22.5
> model.tables(a1)
Tables of effects
temp
300
-6.25
400
6.25
pressure
40
70
6.25 -6.25
cat
20
30
1.25 -1.25
> ############## EFFECTS AS CONTRASTS ######################
> e1=sum(Tensile*c(1,1,1,1,1,1,1,1))/8; e1
[1] 23.75
> eA=sum(Tensile*c(-1,1,-1,1,-1,1,-1,1))/8; eA
[1] 6.25
> eB=sum(Tensile*c(-1,-1,1,1,-1,-1,1,1))/8; eB
[1] -6.25
> eC=sum(Tensile*c(-1,-1,-1,-1,1,1,1,1))/8; eC
[1] -1.25
> eAB=sum(Tensile*c(1,-1,-1,1,1,-1,-1,1))/8; eAB
[1] -3.75
> eAC=sum(Tensile*c(1,-1,1,-1,-1,1,-1,1))/8; eAC
[1] 6.25
> eBC=sum(Tensile*c(1,1,-1,-1,-1,-1,1,1))/8; eBC
[1] -6.25
> eABC=sum(Tensile*c(-1,1,1,-1,1,-1,-1,1))/8; eABC
[1] -8.75
3
> ### QQ-PLOT OF CONTRASTS TO FIND SIGNIFICANT EFFECTS ######
> eff=c(e1,eA,eB,eAB,eC,eAC,eBC,eABC); eff
[1] 23.75 6.25 -6.25 -3.75 -1.25 6.25 -6.25 -8.75
> qqnorm(eff); qqline(eff)
> plot(a1)
> #### EFFECTS 2 (A) AND 6 (AC) SEEM TO DIFFER FROM LINE #####
> #### SO MAY BE SIGNIFICANT.
#####
35
cat
20
25
30
30
20
10
15
25
20
mean of Tensile
40
35
40
70
30
pressure
15
mean of Tensile
Interaction Plots
300
400
300
70
pressure
35
30
10
300
temp
20
30
25
mean of Tensile
26
24
22
30
20
18
mean of Tensile
20
cat
20
40
15
400
temp
28
30
temp
400
cat
40
Factors
70
pressure
4
30
10 15 20 25
Residuals vs Fitted
10
0
-10
0
5
Residuals
20
6
8
2
-20
-10 -5
Sample Quantiles
Normal Q-Q Plot
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
10
15
20
Theoretical Quantiles
25
30
2.0
35
1.0
6
0.0
-1.0
Standardized residuals
1.2
0.4
0.8
8
0.0
Standardized residuals
2
20
35
Normal Q-Q
6
15
30
Fitted values
Scale-Location
10
25
8
2
-1.5
Fitted values
-1.0
-0.5
0.0
0.5
Theoretical Quantiles
5
1.0
1.5
Download