Task 1

Chateau Latour is widely acknowledged as one of the world’s greatest wine estates with a rich history dating back to at least 1638. While many studies have identified that the timing of the harvest of the grapes has an important effect on the quality of the vintage, with quality improving the earlier the harvest, a less explored issue of interest is the effect of unwanted rain at vintage time on the quality of icon wine like Chateau Latour.

The Chateau Latour web site () provides a rich source of data. In particular, data on the quality of each vintage, harvest dates and weather at harvest time were obtained from the site for the vintages from 1961 to 2004. Each vintage was classified as having had ``unwanted rain at harvest” (e.g., the 1994 vintage) or not (e.g., the 1996 vintage). Thus, the data consist of:

Vintage : year the grapes were harvested

Quality : on a scale from 1 (worst) to 5 (best) with some half points

End of harvest : measured as the number days since August 31

Rain : a dummy variable for unwanted rain at harvest = 1 if yes.

The data can be found on Canvas in the file latour.txt. The model considered was:

\[ \mbox{Quality} =\beta_0+\beta_1 \mbox{End of Harvest}+\beta_2\mbox{ Rain}+\beta_3\mbox{End of Harvest }\times\mbox{ Rain}+ e\]

  1. Is the coefficient of the interaction term statistically significant (state its p-value)?

    #(a)
    latour<-read.table("Latour.txt",header = TRUE)
    attach(latour)
    m1<-lm(Quality~EndofHarvest+Rain+EndofHarvest:Rain)
    summary(m1)
    ## 
    ## Call:
    ## lm(formula = Quality ~ EndofHarvest + Rain + EndofHarvest:Rain)
    ## 
    ## Residuals:
    ##     Min      1Q  Median      3Q     Max 
    ## -1.6833 -0.5703  0.1265  0.4385  1.6354 
    ## 
    ## Coefficients:
    ##                   Estimate Std. Error t value Pr(>|t|)    
    ## (Intercept)        5.16122    0.68917   7.489 3.95e-09 ***
    ## EndofHarvest      -0.03145    0.01760  -1.787   0.0816 .  
    ## Rain               1.78670    1.31740   1.356   0.1826    
    ## EndofHarvest:Rain -0.08314    0.03160  -2.631   0.0120 *  
    ## ---
    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    ## 
    ## Residual standard error: 0.7578 on 40 degrees of freedom
    ## Multiple R-squared:  0.6848, Adjusted R-squared:  0.6612 
    ## F-statistic: 28.97 on 3 and 40 DF,  p-value: 4.017e-10
    #The coefficient of the interaction term is 0.012. It is statistically significant at 0.05, but it is not at 0.01.
  2. Estimate the number of days of delay to the end of harvest it takes to decrease the quality rating by 1 point when there is:

    1. No unwanted rain at harvest

    2. Some unwanted rain at harvest

#(b)(i)
x1<-(1-5.16122)/(-0.03145)
x2<-(2-5.16122)/(-0.03145)
x1-x2
## [1] 31.7965
#(b)(ii)
x3<-(1-5.16122-1.78670)/(-0.03145-0.08314)
x4<-(2-5.16122-1.78670)/(-0.03145-0.08314)
x3-x4
## [1] 8.726765

You can use read.table(“latour.txt”,header=TRUE) to read in the data.