Recipe 3

Matthew Macchi

Rensselaer Polytechnic Institute

10/9/14 Version 1

1. Setting

System under test

This recipe will conduct an experiment on the ecdat dataset. The experiment will attempt to investigate the Air Quality for Californian Metropolitan Areas dataset and examine the analysis of variance between the amount of rain (in inches) and coastal location (yes or no) on air quality in hopes of supporting or refuting the claim that the amount of rain and location on air quality do not have much variance.

install.packages("Ecdat", repos='http://cran.us.r-project.org')
## 
## The downloaded binary packages are in
##  /var/folders/55/ql66yz5j3jzgkn6dmnb9sk1c0000gn/T//RtmpbCNfUt/downloaded_packages
library("Ecdat", lib.loc="/Library/Frameworks/R.framework/Versions/3.1/Resources/library")
## Loading required package: Ecfun
## 
## Attaching package: 'Ecdat'
## 
## The following object is masked from 'package:datasets':
## 
##     Orange
y<-Airq
head(y)
##   airq  vala  rain coas   dens  medi
## 1  104  2734 12.63  yes 1815.9  4397
## 2   85  2479 47.14  yes  804.9  5667
## 3  127  4845 42.77  yes 1907.9 15817
## 4  145 19734 33.18   no 1876.1 32698
## 5   84  4094 34.55  yes  340.9  6250
## 6  135  1850 14.81   no  335.5  4705

Factors and Levels

A factor of an experiment is a controlled independent variable; a variable whose levels are set by the experimenter. In this instance, I am conducting a two-factor analysis.

The term level is also used for categorical variables. In this case, this is a multi-level analysis.

The first factor that this experiment will examine is the amount of rain in a certain area.

The second factor that I will consider is whether or not the location is coastal.

head(y)
##   airq  vala  rain coas   dens  medi
## 1  104  2734 12.63  yes 1815.9  4397
## 2   85  2479 47.14  yes  804.9  5667
## 3  127  4845 42.77  yes 1907.9 15817
## 4  145 19734 33.18   no 1876.1 32698
## 5   84  4094 34.55  yes  340.9  6250
## 6  135  1850 14.81   no  335.5  4705
tail(y)
##    airq vala  rain coas   dens medi
## 25   74 5609 42.36  yes 2649.1 8947
## 26  124 3700 29.51   no 9642.9 5952
## 27   69 1396 42.92  yes 1105.5 4146
## 28  118 3023 41.32   no  910.8 3207
## 29  129 1515 31.22   no  379.6  853
## 30  129 1879 30.95   no  455.9  853
summary(y)
##       airq          vala            rain       coas         dens      
##  Min.   : 59   Min.   :  993   Min.   :12.6   no : 9   Min.   :  272  
##  1st Qu.: 81   1st Qu.: 1536   1st Qu.:31.0   yes:21   1st Qu.:  365  
##  Median :114   Median : 2630   Median :36.7            Median :  796  
##  Mean   :105   Mean   : 4188   Mean   :36.1            Mean   : 1729  
##  3rd Qu.:126   3rd Qu.: 4141   3rd Qu.:42.7            3rd Qu.: 1635  
##  Max.   :165   Max.   :19734   Max.   :68.1            Max.   :12958  
##       medi      
##  Min.   :  853  
##  1st Qu.: 3340  
##  Median : 4858  
##  Mean   : 9477  
##  3rd Qu.: 8715  
##  Max.   :59460

Continuous variables (if any)

If a variable can take on any value between its minimum value and its maximum value, it is called a continuous variable; otherwise, it is called a discrete variable.

In this instance, only one variable can be considered continuous. Since air quality is not a categorical variable, it is continuous.

Response variables

A response variable is defined as the outcome of a study. It is a variable you would be interested in predicting or forecasting. It is often called a dependent variable or predicted variable. In this instance, a response variable is city gas mileage, since it will attempt to describe the difference between levels of the two factors of interst.

The Data: How is it organized and what does it look like?

The data is organized initially into an 6 column table: The columns are titled as follows: airq, vala, rain, coas, dens, medi. All data is numeric minus coas which is textual.

Randomization

This data comes from a collection from Yves Croissant. Since this is the only information available in regards to background information about the data collection, it is entirely possible that this data might not be completely randomized or the experiment had a completely randomized design. It is also published on 9/4/2014, so this data is very recent.

2. (Experimental) Design

How will the experiment be organized and conducted to test the hypothesis?

In order to conduct this experiment, I will conduct two separate analysis of the factors at hand. First, I will analyze multiple levels of the rain (rain) of the data. I will then look at the Air Quality (airq) values to see if an obvious difference or pattern can be seen.

Second, I will analyze multiple levels of the location (coas) of the data, which is the second factor. Again, I will then look at the Airq values to see if an obvious difference or pattern can be seen.

What is the rationale for this design?

I have chosen to use this type of experimental design to demonstrate proper experimentation with a data set with at least two factors and at least two levels of each factor.

Randomize: What is the Randomization Scheme?

Like I previously stated, since there is no credible proof this data is randomized, the only randomization involved with this experiments lies in the fact that the factors and their corresponding levels were chosen completely randomly by myself, the experiment conductor.

Replicate: Are there replicates and/or repeated measures?

There are no replicates, but repeated measures do occur between the factors and levels.

Block: Did you use blocking in the design?

The only blocking that I performed in this experimental data analysis is seen in the blocking of vehicles into the different levels of their respective factors.

3. (Statistical) Analysis

(Exploratory Data Analysis) Graphics and descriptive summary

At this point, I must define the amount of rain (rain) and the location (coas) as the factors for analysis.

y$rain=as.factor(y$rain)
y$coas=as.factor(y$coas)

Below are the boxplots of the Air Quality of all levels of the two factors of interest.

par(mfrow=c(1,1))
hist(y$airq)

plot of chunk unnamed-chunk-4

par(mfrow=c(1,1))
boxplot(y$airq, main="Boxplot of Air Quality for Metropolitan California", xlab="Air Quality", ylab=" Air Quality Metric", names=c("Cty"))

plot of chunk unnamed-chunk-4

boxplot(airq~rain, data=y)

plot of chunk unnamed-chunk-4

boxplot(airq~coas, data=y)

plot of chunk unnamed-chunk-4

Testing

At this point, I am introducitng the Analysis of Variance (ANOVA) test. The ANOVA test is used to analyze the differences in the mean Air Qualities of the data with varying number of inches of rain and locations. A third ANOVA test analyzes the interaction effect between the two factors.

model_rain=aov(airq~rain,data=y)
model_coas=aov(airq~coas,data=y)
model_rain_coas=aov(airq~rain*coas,data=y)
anova(model_rain)
## Analysis of Variance Table
## 
## Response: airq
##           Df Sum Sq Mean Sq F value Pr(>F)   
## rain      24  22348     931    10.7 0.0075 **
## Residuals  5    434      87                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(model_coas)
## Analysis of Variance Table
## 
## Response: airq
##           Df Sum Sq Mean Sq F value Pr(>F)   
## coas       1   5474    5474    8.85  0.006 **
## Residuals 28  17309     618                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(model_rain_coas)
## Analysis of Variance Table
## 
## Response: airq
##           Df Sum Sq Mean Sq F value Pr(>F)   
## rain      24  22348     931    10.7 0.0075 **
## Residuals  5    434      87                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

ANOVA Results

The ANOVA test that analyzed the variation in air quality as a result in variation of the amount of rainreturned a p-value of 0.007506. This small p-value translates to the fact that there is a small probability that the variations in air quality with regards to amount of rain in the area is a result of randomization. Thus the conclusion may be drawn that the change in air quality is a result in the change of the inches of rain in a location.

The ANOVA test that analyzed the variation in air quality as a result in variation of the location returned a p-value of 0.005965. This small p-value translates to the fact that there is a small probability that the variations in air quality with regards to location changes, specifically distance from the coast, is a result of randomization. Thus the conclusion may be drawn that the change in air quality is a result in the change of the distance from the coast.

Because both ANOVAs alluded to the fact that both factors can effect the air quality of the Metropolitan area of California, I then performed an ANOVA to analyze the interaction effect of the two factors. The resulting p-value was once again 0.007506 which indicates that when the two factors work together there is a very small probability that the changes in the air quality is a result of randomization.

Diagnostics/Model Adequacy Checking

To check the adequacy of using the ANOVA as a means of analyzing this set of data I performed Quantile-Quantile (Q-Q) tests on the residual error to determine if the residuals followed a normal distribution. I also created an interaction plot to see if there was an interaction effect between the two factors.

The nearly linear fit of the residuals in the first QQ plot in reference to ‘rain’ is an indication that the model is adequate for this analysis.

The nearly linear fit of the residuals in the second QQ plot in refernece to ‘coas’ is an indication that the model is adequate for this analysis.

The interaction plot following the QQ plots shows that the two factors are interacting with eachother to create an effect in the response variable whenever there is an intersection of curves on the plot.

The third type of plot is a Residuals vs.Fits plot which is used to identify the linearity of the residual values and to detemrine if there are any outlying values. Because there are slightly more outliers in the ‘rain’ response variable than in the ‘coas’ response variables it can be reasoned that the model is slightly less adequate to model the ‘coas’ data.

qqnorm(residuals(model_rain))
qqline(residuals(model_rain))

plot of chunk unnamed-chunk-7

qqnorm(residuals(model_coas))
qqline(residuals(model_coas))

plot of chunk unnamed-chunk-8

interaction.plot(y$rain, y$coas, y$airq)

plot of chunk unnamed-chunk-9

plot(fitted(model_rain),residuals(model_rain))

plot of chunk unnamed-chunk-9

plot(fitted(model_coas),residuals(model_coas))

plot of chunk unnamed-chunk-9

4. Post-Hoc Test

Tukey’s HSD test is a post-hoc test, meaning that it is performed after an analysis of variance (ANOVA) test. This means that to maintain integrity, a statistician should not perform Tukey’s HSD test unless she has first performed an ANOVA analysis. In statistics, post-hoc tests are used only for further data analysis; these types of tests are not pre-planned. In other words, you should have no plans to use Tukey’s HSD test before you collect and analyze the data once.

The purpose of Tukey’s HSD test is to determine which groups in the sample differ. While ANOVA can tell the researcher whether groups in the sample differ, it cannot tell the researcher which groups differ. That is, if the results of ANOVA are positive in the sense that they state there is a significant difference among the groups, the obvious question becomes: Which groups in this sample differ significantly? It is not likely that all groups differ when compared to each other, only that a handful have significant differences. Tukey’s HSD can clarify to the researcher which groups among the sample in specific have significant differences.

TukeyHSD(model_rain_coas, "rain")
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = airq ~ rain * coas, data = y)
## 
## $rain
##                   diff       lwr       upr  p adj
## 14.81-12.63  3.900e+01  -26.2579 104.25788 0.3031
## 18.69-12.63 -3.700e+01  -88.5909  14.59088 0.1728
## 29.51-12.63  2.800e+01  -37.2579  93.25788 0.6350
## 30.95-12.63  3.300e+01  -32.2579  98.25788 0.4621
## 31.22-12.63  3.300e+01  -32.2579  98.25788 0.4621
## 33.18-12.63  4.900e+01  -16.2579 114.25788 0.1478
## 34.55-12.63 -1.200e+01  -77.2579  53.25788 0.9986
## 35.08-12.63  2.400e+01  -41.2579  89.25788 0.7829
## 35.35-12.63  1.900e+01  -32.5909  70.59088 0.7817
## 36.14-12.63  6.900e+01    3.7421 134.25788 0.0398
## 37.18-12.63 -1.200e+01  -77.2579  53.25788 0.9986
## 39.25-12.63  2.200e+01  -43.2579  87.25788 0.8504
## 41.32-12.63  2.200e+01  -43.2579  87.25788 0.8504
## 42.36-12.63 -2.200e+01  -73.5909  29.59088 0.6414
## 42.37-12.63  3.500e+01  -30.2579 100.25788 0.4027
## 42.48-12.63  3.300e+01  -32.2579  98.25788 0.4621
## 42.77-12.63  3.100e+01  -34.2579  96.25788 0.5276
## 42.92-12.63 -2.700e+01  -92.2579  38.25788 0.6723
## 43.05-12.63  2.200e+01  -43.2579  87.25788 0.8504
## 45.94-12.63 -8.000e+00  -73.2579  57.25788 1.0000
## 47.14-12.63 -1.100e+01  -76.2579  54.25788 0.9995
## 53.9-12.63  -2.100e+01  -86.2579  44.25788 0.8806
## 59.76-12.63 -3.200e+01  -97.2579  33.25788 0.4941
## 68.13-12.63  2.400e+01  -41.2579  89.25788 0.7829
## 18.69-14.81 -7.600e+01 -145.2164  -6.78357 0.0340
## 29.51-14.81 -1.100e+01  -90.9243  68.92425 1.0000
## 30.95-14.81 -6.000e+00  -85.9243  73.92425 1.0000
## 31.22-14.81 -6.000e+00  -85.9243  73.92425 1.0000
## 33.18-14.81  1.000e+01  -69.9243  89.92425 1.0000
## 34.55-14.81 -5.100e+01 -130.9243  28.92425 0.2505
## 35.08-14.81 -1.500e+01  -94.9243  64.92425 0.9982
## 35.35-14.81 -2.000e+01  -89.2164  49.21643 0.9343
## 36.14-14.81  3.000e+01  -49.9243 109.92425 0.7651
## 37.18-14.81 -5.100e+01 -130.9243  28.92425 0.2505
## 39.25-14.81 -1.700e+01  -96.9243  62.92425 0.9937
## 41.32-14.81 -1.700e+01  -96.9243  62.92425 0.9937
## 42.36-14.81 -6.100e+01 -130.2164   8.21643 0.0823
## 42.37-14.81 -4.000e+00  -83.9243  75.92425 1.0000
## 42.48-14.81 -6.000e+00  -85.9243  73.92425 1.0000
## 42.77-14.81 -8.000e+00  -87.9243  71.92425 1.0000
## 42.92-14.81 -6.600e+01 -145.9243  13.92425 0.1052
## 43.05-14.81 -1.700e+01  -96.9243  62.92425 0.9937
## 45.94-14.81 -4.700e+01 -126.9243  32.92425 0.3170
## 47.14-14.81 -5.000e+01 -129.9243  29.92425 0.2657
## 53.9-14.81  -6.000e+01 -139.9243  19.92425 0.1479
## 59.76-14.81 -7.100e+01 -150.9243   8.92425 0.0799
## 68.13-14.81 -1.500e+01  -94.9243  64.92425 0.9982
## 29.51-18.69  6.500e+01   -4.2164 134.21643 0.0643
## 30.95-18.69  7.000e+01    0.7836 139.21643 0.0478
## 31.22-18.69  7.000e+01    0.7836 139.21643 0.0478
## 33.18-18.69  8.600e+01   16.7836 155.21643 0.0200
## 34.55-18.69  2.500e+01  -44.2164  94.21643 0.7981
## 35.08-18.69  6.100e+01   -8.2164 130.21643 0.0823
## 35.35-18.69  5.600e+01   -0.5150 112.51498 0.0519
## 36.14-18.69  1.060e+02   36.7836 175.21643 0.0078
## 37.18-18.69  2.500e+01  -44.2164  94.21643 0.7981
## 39.25-18.69  5.900e+01  -10.2164 128.21643 0.0934
## 41.32-18.69  5.900e+01  -10.2164 128.21643 0.0934
## 42.36-18.69  1.500e+01  -41.5150  71.51498 0.9621
## 42.37-18.69  7.200e+01    2.7836 141.21643 0.0425
## 42.48-18.69  7.000e+01    0.7836 139.21643 0.0478
## 42.77-18.69  6.800e+01   -1.2164 137.21643 0.0537
## 42.92-18.69  1.000e+01  -59.2164  79.21643 0.9999
## 43.05-18.69  5.900e+01  -10.2164 128.21643 0.0934
## 45.94-18.69  2.900e+01  -40.2164  98.21643 0.6595
## 47.14-18.69  2.600e+01  -43.2164  95.21643 0.7645
## 53.9-18.69   1.600e+01  -53.2164  85.21643 0.9868
## 59.76-18.69  5.000e+00  -64.2164  74.21643 1.0000
## 68.13-18.69  6.100e+01   -8.2164 130.21643 0.0823
## 30.95-29.51  5.000e+00  -74.9243  84.92425 1.0000
## 31.22-29.51  5.000e+00  -74.9243  84.92425 1.0000
## 33.18-29.51  2.100e+01  -58.9243 100.92425 0.9647
## 34.55-29.51 -4.000e+01 -119.9243  39.92425 0.4728
## 35.08-29.51 -4.000e+00  -83.9243  75.92425 1.0000
## 35.35-29.51 -9.000e+00  -78.2164  60.21643 1.0000
## 36.14-29.51  4.100e+01  -38.9243 120.92425 0.4474
## 37.18-29.51 -4.000e+01 -119.9243  39.92425 0.4728
## 39.25-29.51 -6.000e+00  -85.9243  73.92425 1.0000
## 41.32-29.51 -6.000e+00  -85.9243  73.92425 1.0000
## 42.36-29.51 -5.000e+01 -119.2164  19.21643 0.1686
## 42.37-29.51  7.000e+00  -72.9243  86.92425 1.0000
## 42.48-29.51  5.000e+00  -74.9243  84.92425 1.0000
## 42.77-29.51  3.000e+00  -76.9243  82.92425 1.0000
## 42.92-29.51 -5.500e+01 -134.9243  24.92425 0.1979
## 43.05-29.51 -6.000e+00  -85.9243  73.92425 1.0000
## 45.94-29.51 -3.600e+01 -115.9243  43.92425 0.5840
## 47.14-29.51 -3.900e+01 -118.9243  40.92425 0.4993
## 53.9-29.51  -4.900e+01 -128.9243  30.92425 0.2819
## 59.76-29.51 -6.000e+01 -139.9243  19.92425 0.1479
## 68.13-29.51 -4.000e+00  -83.9243  75.92425 1.0000
## 31.22-30.95 -2.842e-14  -79.9243  79.92425 1.0000
## 33.18-30.95  1.600e+01  -63.9243  95.92425 0.9965
## 34.55-30.95 -4.500e+01 -124.9243  34.92425 0.3562
## 35.08-30.95 -9.000e+00  -88.9243  70.92425 1.0000
## 35.35-30.95 -1.400e+01  -83.2164  55.21643 0.9961
## 36.14-30.95  3.600e+01  -43.9243 115.92425 0.5840
## 37.18-30.95 -4.500e+01 -124.9243  34.92425 0.3562
## 39.25-30.95 -1.100e+01  -90.9243  68.92425 1.0000
## 41.32-30.95 -1.100e+01  -90.9243  68.92425 1.0000
## 42.36-30.95 -5.500e+01 -124.2164  14.21643 0.1210
## 42.37-30.95  2.000e+00  -77.9243  81.92425 1.0000
## 42.48-30.95 -2.842e-14  -79.9243  79.92425 1.0000
## 42.77-30.95 -2.000e+00  -81.9243  77.92425 1.0000
## 42.92-30.95 -6.000e+01 -139.9243  19.92425 0.1479
## 43.05-30.95 -1.100e+01  -90.9243  68.92425 1.0000
## 45.94-30.95 -4.100e+01 -120.9243  38.92425 0.4474
## 47.14-30.95 -4.400e+01 -123.9243  35.92425 0.3774
## 53.9-30.95  -5.400e+01 -133.9243  25.92425 0.2099
## 59.76-30.95 -6.500e+01 -144.9243  14.92425 0.1112
## 68.13-30.95 -9.000e+00  -88.9243  70.92425 1.0000
## 33.18-31.22  1.600e+01  -63.9243  95.92425 0.9965
## 34.55-31.22 -4.500e+01 -124.9243  34.92425 0.3562
## 35.08-31.22 -9.000e+00  -88.9243  70.92425 1.0000
## 35.35-31.22 -1.400e+01  -83.2164  55.21643 0.9961
## 36.14-31.22  3.600e+01  -43.9243 115.92425 0.5840
## 37.18-31.22 -4.500e+01 -124.9243  34.92425 0.3562
## 39.25-31.22 -1.100e+01  -90.9243  68.92425 1.0000
## 41.32-31.22 -1.100e+01  -90.9243  68.92425 1.0000
## 42.36-31.22 -5.500e+01 -124.2164  14.21643 0.1210
## 42.37-31.22  2.000e+00  -77.9243  81.92425 1.0000
## 42.48-31.22  0.000e+00  -79.9243  79.92425 1.0000
## 42.77-31.22 -2.000e+00  -81.9243  77.92425 1.0000
## 42.92-31.22 -6.000e+01 -139.9243  19.92425 0.1479
## 43.05-31.22 -1.100e+01  -90.9243  68.92425 1.0000
## 45.94-31.22 -4.100e+01 -120.9243  38.92425 0.4474
## 47.14-31.22 -4.400e+01 -123.9243  35.92425 0.3774
## 53.9-31.22  -5.400e+01 -133.9243  25.92425 0.2099
## 59.76-31.22 -6.500e+01 -144.9243  14.92425 0.1112
## 68.13-31.22 -9.000e+00  -88.9243  70.92425 1.0000
## 34.55-33.18 -6.100e+01 -140.9243  18.92425 0.1396
## 35.08-33.18 -2.500e+01 -104.9243  54.92425 0.8969
## 35.35-33.18 -3.000e+01  -99.2164  39.21643 0.6245
## 36.14-33.18  2.000e+01  -59.9243  99.92425 0.9752
## 37.18-33.18 -6.100e+01 -140.9243  18.92425 0.1396
## 39.25-33.18 -2.700e+01 -106.9243  52.92425 0.8490
## 41.32-33.18 -2.700e+01 -106.9243  52.92425 0.8490
## 42.36-33.18 -7.100e+01 -140.2164  -1.78357 0.0451
## 42.37-33.18 -1.400e+01  -93.9243  65.92425 0.9992
## 42.48-33.18 -1.600e+01  -95.9243  63.92425 0.9965
## 42.77-33.18 -1.800e+01  -97.9243  61.92425 0.9895
## 42.92-33.18 -7.600e+01 -155.9243   3.92425 0.0612
## 43.05-33.18 -2.700e+01 -106.9243  52.92425 0.8490
## 45.94-33.18 -5.700e+01 -136.9243  22.92425 0.1760
## 47.14-33.18 -6.000e+01 -139.9243  19.92425 0.1479
## 53.9-33.18  -7.000e+01 -149.9243   9.92425 0.0843
## 59.76-33.18 -8.100e+01 -160.9243  -1.07575 0.0474
## 68.13-33.18 -2.500e+01 -104.9243  54.92425 0.8969
## 35.08-34.55  3.600e+01  -43.9243 115.92425 0.5840
## 35.35-34.55  3.100e+01  -38.2164 100.21643 0.5900
## 36.14-34.55  8.100e+01    1.0757 160.92425 0.0474
## 37.18-34.55 -1.421e-14  -79.9243  79.92425 1.0000
## 39.25-34.55  3.400e+01  -45.9243 113.92425 0.6439
## 41.32-34.55  3.400e+01  -45.9243 113.92425 0.6439
## 42.36-34.55 -1.000e+01  -79.2164  59.21643 0.9999
## 42.37-34.55  4.700e+01  -32.9243 126.92425 0.3170
## 42.48-34.55  4.500e+01  -34.9243 124.92425 0.3562
## 42.77-34.55  4.300e+01  -36.9243 122.92425 0.3997
## 42.92-34.55 -1.500e+01  -94.9243  64.92425 0.9982
## 43.05-34.55  3.400e+01  -45.9243 113.92425 0.6439
## 45.94-34.55  4.000e+00  -75.9243  83.92425 1.0000
## 47.14-34.55  1.000e+00  -78.9243  80.92425 1.0000
## 53.9-34.55  -9.000e+00  -88.9243  70.92425 1.0000
## 59.76-34.55 -2.000e+01  -99.9243  59.92425 0.9752
## 68.13-34.55  3.600e+01  -43.9243 115.92425 0.5840
## 35.35-35.08 -5.000e+00  -74.2164  64.21643 1.0000
## 36.14-35.08  4.500e+01  -34.9243 124.92425 0.3562
## 37.18-35.08 -3.600e+01 -115.9243  43.92425 0.5840
## 39.25-35.08 -2.000e+00  -81.9243  77.92425 1.0000
## 41.32-35.08 -2.000e+00  -81.9243  77.92425 1.0000
## 42.36-35.08 -4.600e+01 -115.2164  23.21643 0.2211
## 42.37-35.08  1.100e+01  -68.9243  90.92425 1.0000
## 42.48-35.08  9.000e+00  -70.9243  88.92425 1.0000
## 42.77-35.08  7.000e+00  -72.9243  86.92425 1.0000
## 42.92-35.08 -5.100e+01 -130.9243  28.92425 0.2505
## 43.05-35.08 -2.000e+00  -81.9243  77.92425 1.0000
## 45.94-35.08 -3.200e+01 -111.9243  47.92425 0.7049
## 47.14-35.08 -3.500e+01 -114.9243  44.92425 0.6137
## 53.9-35.08  -4.500e+01 -124.9243  34.92425 0.3562
## 59.76-35.08 -5.600e+01 -135.9243  23.92425 0.1866
## 68.13-35.08  1.421e-14  -79.9243  79.92425 1.0000
## 36.14-35.35  5.000e+01  -19.2164 119.21643 0.1686
## 37.18-35.35 -3.100e+01 -100.2164  38.21643 0.5900
## 39.25-35.35  3.000e+00  -66.2164  72.21643 1.0000
## 41.32-35.35  3.000e+00  -66.2164  72.21643 1.0000
## 42.36-35.35 -4.100e+01  -97.5150  15.51498 0.1662
## 42.37-35.35  1.600e+01  -53.2164  85.21643 0.9868
## 42.48-35.35  1.400e+01  -55.2164  83.21643 0.9961
## 42.77-35.35  1.200e+01  -57.2164  81.21643 0.9993
## 42.92-35.35 -4.600e+01 -115.2164  23.21643 0.2211
## 43.05-35.35  3.000e+00  -66.2164  72.21643 1.0000
## 45.94-35.35 -2.700e+01  -96.2164  42.21643 0.7299
## 47.14-35.35 -3.000e+01  -99.2164  39.21643 0.6245
## 53.9-35.35  -4.000e+01 -109.2164  29.21643 0.3324
## 59.76-35.35 -5.100e+01 -120.2164  18.21643 0.1577
## 68.13-35.35  5.000e+00  -64.2164  74.21643 1.0000
## 37.18-36.14 -8.100e+01 -160.9243  -1.07575 0.0474
## 39.25-36.14 -4.700e+01 -126.9243  32.92425 0.3170
## 41.32-36.14 -4.700e+01 -126.9243  32.92425 0.3170
## 42.36-36.14 -9.100e+01 -160.2164 -21.78357 0.0156
## 42.37-36.14 -3.400e+01 -113.9243  45.92425 0.6439
## 42.48-36.14 -3.600e+01 -115.9243  43.92425 0.5840
## 42.77-36.14 -3.800e+01 -117.9243  41.92425 0.5267
## 42.92-36.14 -9.600e+01 -175.9243 -16.07575 0.0232
## 43.05-36.14 -4.700e+01 -126.9243  32.92425 0.3170
## 45.94-36.14 -7.700e+01 -156.9243   2.92425 0.0581
## 47.14-36.14 -8.000e+01 -159.9243  -0.07575 0.0498
## 53.9-36.14  -9.000e+01 -169.9243 -10.07575 0.0305
## 59.76-36.14 -1.010e+02 -180.9243 -21.07575 0.0186
## 68.13-36.14 -4.500e+01 -124.9243  34.92425 0.3562
## 39.25-37.18  3.400e+01  -45.9243 113.92425 0.6439
## 41.32-37.18  3.400e+01  -45.9243 113.92425 0.6439
## 42.36-37.18 -1.000e+01  -79.2164  59.21643 0.9999
## 42.37-37.18  4.700e+01  -32.9243 126.92425 0.3170
## 42.48-37.18  4.500e+01  -34.9243 124.92425 0.3562
## 42.77-37.18  4.300e+01  -36.9243 122.92425 0.3997
## 42.92-37.18 -1.500e+01  -94.9243  64.92425 0.9982
## 43.05-37.18  3.400e+01  -45.9243 113.92425 0.6439
## 45.94-37.18  4.000e+00  -75.9243  83.92425 1.0000
## 47.14-37.18  1.000e+00  -78.9243  80.92425 1.0000
## 53.9-37.18  -9.000e+00  -88.9243  70.92425 1.0000
## 59.76-37.18 -2.000e+01  -99.9243  59.92425 0.9752
## 68.13-37.18  3.600e+01  -43.9243 115.92425 0.5840
## 41.32-39.25  0.000e+00  -79.9243  79.92425 1.0000
## 42.36-39.25 -4.400e+01 -113.2164  25.21643 0.2534
## 42.37-39.25  1.300e+01  -66.9243  92.92425 0.9997
## 42.48-39.25  1.100e+01  -68.9243  90.92425 1.0000
## 42.77-39.25  9.000e+00  -70.9243  88.92425 1.0000
## 42.92-39.25 -4.900e+01 -128.9243  30.92425 0.2819
## 43.05-39.25 -1.421e-14  -79.9243  79.92425 1.0000
## 45.94-39.25 -3.000e+01 -109.9243  49.92425 0.7651
## 47.14-39.25 -3.300e+01 -112.9243  46.92425 0.6743
## 53.9-39.25  -4.300e+01 -122.9243  36.92425 0.3997
## 59.76-39.25 -5.400e+01 -133.9243  25.92425 0.2099
## 68.13-39.25  2.000e+00  -77.9243  81.92425 1.0000
## 42.36-41.32 -4.400e+01 -113.2164  25.21643 0.2534
## 42.37-41.32  1.300e+01  -66.9243  92.92425 0.9997
## 42.48-41.32  1.100e+01  -68.9243  90.92425 1.0000
## 42.77-41.32  9.000e+00  -70.9243  88.92425 1.0000
## 42.92-41.32 -4.900e+01 -128.9243  30.92425 0.2819
## 43.05-41.32 -1.421e-14  -79.9243  79.92425 1.0000
## 45.94-41.32 -3.000e+01 -109.9243  49.92425 0.7651
## 47.14-41.32 -3.300e+01 -112.9243  46.92425 0.6743
## 53.9-41.32  -4.300e+01 -122.9243  36.92425 0.3997
## 59.76-41.32 -5.400e+01 -133.9243  25.92425 0.2099
## 68.13-41.32  2.000e+00  -77.9243  81.92425 1.0000
## 42.37-42.36  5.700e+01  -12.2164 126.21643 0.1062
## 42.48-42.36  5.500e+01  -14.2164 124.21643 0.1210
## 42.77-42.36  5.300e+01  -16.2164 122.21643 0.1380
## 42.92-42.36 -5.000e+00  -74.2164  64.21643 1.0000
## 43.05-42.36  4.400e+01  -25.2164 113.21643 0.2534
## 45.94-42.36  1.400e+01  -55.2164  83.21643 0.9961
## 47.14-42.36  1.100e+01  -58.2164  80.21643 0.9997
## 53.9-42.36   1.000e+00  -68.2164  70.21643 1.0000
## 59.76-42.36 -1.000e+01  -79.2164  59.21643 0.9999
## 68.13-42.36  4.600e+01  -23.2164 115.21643 0.2211
## 42.48-42.37 -2.000e+00  -81.9243  77.92425 1.0000
## 42.77-42.37 -4.000e+00  -83.9243  75.92425 1.0000
## 42.92-42.37 -6.200e+01 -141.9243  17.92425 0.1318
## 43.05-42.37 -1.300e+01  -92.9243  66.92425 0.9997
## 45.94-42.37 -4.300e+01 -122.9243  36.92425 0.3997
## 47.14-42.37 -4.600e+01 -125.9243  33.92425 0.3361
## 53.9-42.37  -5.600e+01 -135.9243  23.92425 0.1866
## 59.76-42.37 -6.700e+01 -146.9243  12.92425 0.0995
## 68.13-42.37 -1.100e+01  -90.9243  68.92425 1.0000
## 42.77-42.48 -2.000e+00  -81.9243  77.92425 1.0000
## 42.92-42.48 -6.000e+01 -139.9243  19.92425 0.1479
## 43.05-42.48 -1.100e+01  -90.9243  68.92425 1.0000
## 45.94-42.48 -4.100e+01 -120.9243  38.92425 0.4474
## 47.14-42.48 -4.400e+01 -123.9243  35.92425 0.3774
## 53.9-42.48  -5.400e+01 -133.9243  25.92425 0.2099
## 59.76-42.48 -6.500e+01 -144.9243  14.92425 0.1112
## 68.13-42.48 -9.000e+00  -88.9243  70.92425 1.0000
## 42.92-42.77 -5.800e+01 -137.9243  21.92425 0.1661
## 43.05-42.77 -9.000e+00  -88.9243  70.92425 1.0000
## 45.94-42.77 -3.900e+01 -118.9243  40.92425 0.4993
## 47.14-42.77 -4.200e+01 -121.9243  37.92425 0.4230
## 53.9-42.77  -5.200e+01 -131.9243  27.92425 0.2362
## 59.76-42.77 -6.300e+01 -142.9243  16.92425 0.1245
## 68.13-42.77 -7.000e+00  -86.9243  72.92425 1.0000
## 43.05-42.92  4.900e+01  -30.9243 128.92425 0.2819
## 45.94-42.92  1.900e+01  -60.9243  98.92425 0.9834
## 47.14-42.92  1.600e+01  -63.9243  95.92425 0.9965
## 53.9-42.92   6.000e+00  -73.9243  85.92425 1.0000
## 59.76-42.92 -5.000e+00  -84.9243  74.92425 1.0000
## 68.13-42.92  5.100e+01  -28.9243 130.92425 0.2505
## 45.94-43.05 -3.000e+01 -109.9243  49.92425 0.7651
## 47.14-43.05 -3.300e+01 -112.9243  46.92425 0.6743
## 53.9-43.05  -4.300e+01 -122.9243  36.92425 0.3997
## 59.76-43.05 -5.400e+01 -133.9243  25.92425 0.2099
## 68.13-43.05  2.000e+00  -77.9243  81.92425 1.0000
## 47.14-45.94 -3.000e+00  -82.9243  76.92425 1.0000
## 53.9-45.94  -1.300e+01  -92.9243  66.92425 0.9997
## 59.76-45.94 -2.400e+01 -103.9243  55.92425 0.9177
## 68.13-45.94  3.200e+01  -47.9243 111.92425 0.7049
## 53.9-47.14  -1.000e+01  -89.9243  69.92425 1.0000
## 59.76-47.14 -2.100e+01 -100.9243  58.92425 0.9647
## 68.13-47.14  3.500e+01  -44.9243 114.92425 0.6137
## 59.76-53.9  -1.100e+01  -90.9243  68.92425 1.0000
## 68.13-53.9   4.500e+01  -34.9243 124.92425 0.3562
## 68.13-59.76  5.600e+01  -23.9243 135.92425 0.1866
plot(TukeyHSD(model_rain_coas, "rain"))

plot of chunk unnamed-chunk-10

5. References to the literature

See course canvas site. Also http://cran.r-project.org/web/packages/Ecdat/index.html

A summary of, or pointer to, the raw data

complete and documented R code