










Seals example  X = Temperature in degrees Celsius
		Y = Thermal conductivity 

	Data from a problem in Primer of Applied Regression and Analysis
 of Variance by Stanton K. Glantz and Brian K. Slinker 


 MTB > print c1 c2
 
  ROW   temp  conduct
 
    1    -40     2.81
    2    -40     1.82
    3    -40     1.80
    4    -30     2.25
    5    -30     2.19
    6    -30     2.02
    7    -30     1.57
    8    -30     1.40
    9    -20     1.94
   10    -20     1.40
   11    -20     1.18
   12    -10     1.63
   13    -10     1.26
   14    -10     0.93
   15     10     2.22
   16     10     1.97
   17     10     1.74
   18     20     4.49
   19     20     4.33
   20     20     3.10

	Scatterplot of the data

 MTB > plot c2 c1
 
          -                                                      *
  conduct -                                                      *
          -
          -
       3.6+
          -
          -                                                      *
          -    *
          -
       2.4+
          -            2                                *
          -    *       *       *                        *
          -    *       *                *               *
          -            *       *
       1.2+                    *        *
          -                             *
          -
            ------+---------+---------+---------+---------+---------+temp    
                -36       -24       -12         0        12        24
 
	There does not appear to be a linear relationship between the
	two variables.  There is marked curvature in the scatterplot.

LINEAR MODEL

 MTB > regress c2 on 1 in c1 c3 c4
 
 The regression equation is
 conduct = 2.41 + 0.0227 temp
 
 Predictor       Coef       Stdev    t-ratio        p
 Constant      2.4093      0.2223      10.84    0.000
 temp        0.022724    0.008963       2.54    0.021
 
 s = 0.8338      R-sq = 26.3%     R-sq(adj) = 22.2%
 
 Analysis of Variance
 
 SOURCE       DF          SS          MS         F        p
 Regression    1      4.4692      4.4692      6.43    0.021
 Error        18     12.5144      0.6952
 Total        19     16.9836
 
 Unusual Observations
 Obs.    temp   conduct       Fit Stdev.Fit  Residual   St.Resid
  18     20.0     4.490     2.864     0.353     1.626      2.15R 
 
 R denotes an obs. with a large st. resid.

			RESIDUAL PLOT
 MTB > name c3 'ri' (ri are the standardized residuals)
 MTB > name c4 'y-hat'(y-hat are the predicted values or fitted values)

 MTB > plot c3 c4
 
          -                                                        *
  ri      -                                                        *
          - *
          -
       1.2+
          -
          -          *
          - 2        2
          -                                                        *
       0.0+                   *
          -          *
          -          *                                   *
          -                   *        *
          -                   *                          *
      -1.2+                            *                 *
          -                            *
          -
            +---------+---------+---------+---------+---------+------y-hat   
         1.50      1.75      2.00      2.25      2.50      2.75
 

	The residual plot shows marked curvature. A linear model is not
	appropriate.
 
MTB > hist c3
 
 Histogram of ri   N = 20
 
 Midpoint   Count
     -1.5       1  *
     -1.0       4  ****
     -0.5       4  ****
      0.0       2  **
      0.5       6  ******
      1.0       0
      1.5       1  *
      2.0       2  **
 
 MTB > nscores c3 c5
 MTB > plot c3 c5
 
          -                                                        *
  ri      -                                                 *
          -                                             *
          -
       1.2+
          -
          -                                          *
          -                                 * * *  *
          -                                *
       0.0+                              *
          -                            *
          -                         **
          -                     * *
          -                * *
      -1.2+         *   *
          -  *
          -
            --------+---------+---------+---------+---------+--------C5      
                -1.40     -0.70      0.00      0.70      1.40



MODEL WITH AN X-SQUARED TERM ADDED

 MTB > mult c1 c1 c11
 MTB > regress c2 on 2 in c1 c11 c15 c16
 
 The regression equation is
 conduct = 1.72 + 0.0577 temp + 0.00188 C11
 
 Predictor       Coef       Stdev    t-ratio        p
 Constant      1.7249      0.1919       8.99    0.000
 temp        0.057692    0.008749       6.59    0.000
 C11        0.0018804   0.0003574       5.26    0.000
 
 s = 0.5293      R-sq = 72.0%     R-sq(adj) = 68.7%
 
 Analysis of Variance
 
 SOURCE       DF          SS          MS         F        p
 Regression    2     12.2214      6.1107     21.81    0.000
 Error        17      4.7621      0.2801
 Total        19     16.9836
 
 SOURCE       DF      SEQ SS
 temp          1      4.4692
 C11           1      7.7522
 
 MTB > plot c15 c16
 
  C15     -                                                    *
          -
          -                                                    *
       1.2+     *       *
          -             *
          -      *      *              *
          -
          -     *
       0.0+
          -     **      *
          -             *               *
          -      *
          -                             *
      -1.2+                            *                       *
          -                            **
          -
          -
            --------+---------+---------+---------+---------+--------C16     
                 1.50      2.00      2.50      3.00      3.50
 

 MTB > hist c15
 
 Histogram of C15   N = 20
 
 Midpoint   Count
     -1.5       3  ***
     -1.0       3  ***
     -0.5       3  ***
      0.0       3  ***
      0.5       2  **
      1.0       4  ****
      1.5       1  *
      2.0       1  *
 
 MTB > nscores c15 c17
 MTB > plot c15 c17
 
  C15     -                                                        *
          -
          -                                                 *
       1.2+                                          *  *
          -                                        *
          -                                 * * *
          -
          -                                *
       0.0+
          -                          * * *
          -                       * *
          -                     *
          -                  *
      -1.2+             *  *
          -  *      *
          -
          -
            --------+---------+---------+---------+---------+--------C17     
                -1.40     -0.70      0.00      0.70      1.40
 

	Residual plot, histogram and nscores plot are satisfactory.

COMPARISOON OF PREDICTIONS USING THE TWO MODELS

SIMPLE LINEAR MODEL
 MTB > regress c2 on 1 in c1;
 SUBC> predict -20;
 SUBC> predict -40.
 
 The regression equation is
 conduct = 2.41 + 0.0227 temp
 
 Predictor       Coef       Stdev    t-ratio        p
 Constant      2.4093      0.2223      10.84    0.000
 temp        0.022724    0.008963       2.54    0.021
 
 s = 0.8338      R-sq = 26.3%     R-sq(adj) = 22.2%
 
 Analysis of Variance
 
 SOURCE       DF          SS          MS         F        p
 Regression    1      4.4692      4.4692      6.43    0.021
 Error        18     12.5144      0.6952
 Total        19     16.9836
 
 Unusual Observations
 Obs.    temp   conduct       Fit Stdev.Fit  Residual   St.Resid
  18     20.0     4.490     2.864     0.353     1.626      2.15R 
 
 R denotes an obs. with a large st. resid.
 
      Fit  Stdev.Fit         95% C.I.         95% P.I.
    1.955      0.195   (  1.544,  2.365)  (  0.155,  3.754)   
 
    1.500      0.302   (  0.866,  2.135)  ( -0.363,  3.364)   
 
 MODEL WITH THE X-SQUARED TERM ADDED
 
 MTB > regress c2 on 2 in c1 c11;
 SUBC> predict -20 400;
 SUBC> predict -40 1600.
 
 The regression equation is
 conduct = 1.72 + 0.0577 temp + 0.00188 C11
 
 Predictor       Coef       Stdev    t-ratio        p
 Constant      1.7249      0.1919       8.99    0.000
 temp        0.057692    0.008749       6.59    0.000
 C11        0.0018804   0.0003574       5.26    0.000
 
 s = 0.5293      R-sq = 72.0%     R-sq(adj) = 68.7%
 
 Analysis of Variance
 
 SOURCE       DF          SS          MS         F        p
 Regression    2     12.2214      6.1107     21.81    0.000
 Error        17      4.7621      0.2801
 Total        19     16.9836
 
 SOURCE       DF      SEQ SS
 temp          1      4.4692
 C11           1      7.7522
 

 
      Fit  Stdev.Fit         95% C.I.         95% P.I.
    1.323      0.173   (  0.959,  1.687)  (  0.148,  2.498)   
 
    2.426      0.260   (  1.877,  2.975)  (  1.181,  3.670)   
 
 
 
