Docsity

The Simple Linear Regression Analysis - Experiment 5 | STAT 462, Lab Reports of Statistics

Toggle sidebar
bg1
1
Computer Lab Session #5
Load the file BEARS.MTW from the Minitab example data sets. Consider the simple linear
regressions of y=Weight on x=Length, and using Stat > Regression > Regression >
Graphs, produce the plot of regular residuals vs x=Length, and the normal probability plot
for regular residuals.
• What can you notice in the plot of residuals vs x=Length? Is there evidence that the
relationship between y and x may not be well described by a line? Is there evidence that
the error variance may not be constant?
• What can you notice in the normal probability plot? Is there evidence that the deviations
from the regression line may not behave like Gaussian errors?
Let’s consider (much more on this later) a quadratic regression for y=Weight on x=Length. Use
Calc > Calculator to produce w=Length2, and then use again Stat > Regression >
Regression > Graphs (upload both x and w in the list of predictors). With Graphs,
produce the plot of regular residuals vs fits, and again the normal probability plot for regular
residuals.
• Why are we using the plot of residuals vs fits (instead of x=Length) here?
• What can you notice in the plot of residuals vs fits? Is the curvature gone? Is there
evidence that the error variance may not be constant, even when considering a quadratic
model?
• What can you notice in the normal probability plot? Is there evidence that the deviations
from the regression parabola may not behave like Gaussian errors? Are they closer to
normality than the deviations from the regression line?
To visualize the fitted quadratic regression, use Stat > Regression > Fitted line plot, and
the “Quadratic” option. Is the R2 for the quadratic regression higher than the one obtained
with the simple linear regression? Using Stat > Basic Statistics > Correlation, compute
the correlation between y=Weight and x=Length. Verify that the R2 for the simple linear
regression is the square of the correlation coefficient, and the R2 for is not.
Load the file SALARY.MTW, from the Minitab example data sets, Student 12 subdirectory.
This contains several variables for n=171 faculty in a small college, including y=1991$ (salary
in 1991, the current year in the study) and x=Begin$ (salary when each faculty was hired).
Consider the simple linear regressions of y on x, and using Stat > Regression >
Regression > Graphs, produce the plot of standardized residuals vs x=Begin$.
• Is there any outlier? Look for residuals that stand out relative to the other residuals
and/or that have extreme values (e.g. ~4; these are standardized).
From the regression output providing unusual observation, identify the observation with the
largest standardized residual. Use Data >Subset worksheet (“Specify row number” option)
to remove this observation from the data set, then run the regression again.
• Did the regression fit change in a substantial way? Look at R2 , and estimated slope and
intercept.
A substantial change in the estimated regression parameters would make this outlier influential
(much more about this later).
pf2

Partial preview of the text

Download The Simple Linear Regression Analysis - Experiment 5 | STAT 462 and more Lab Reports Statistics in PDF only on Docsity!

1

Computer Lab Session #

Load the file BEARS.MTW from the Minitab example data sets. Consider the simple linear regressions of y=Weight on x=Length, and using Stat > Regression > Regression > Graphs , produce the plot of regular residuals vs x=Length, and the normal probability plot for regular residuals.

  • What can you notice in the plot of residuals vs x=Length? Is there evidence that the relationship between y and x may not be well described by a line? Is there evidence that the error variance may not be constant?
  • What can you notice in the normal probability plot? Is there evidence that the deviations from the regression line may not behave like Gaussian errors? Let’s consider (much more on this later) a quadratic regression for y=Weight on x=Length. Use Calc > Calculator to produce w=Length^2 , and then use again Stat > Regression > Regression > Graphs (upload both x and w in the list of predictors). With Graphs , produce the plot of regular residuals vs fits, and again the normal probability plot for regular residuals.
  • Why are we using the plot of residuals vs fits (instead of x=Length) here?
  • What can you notice in the plot of residuals vs fits? Is the curvature gone? Is there evidence that the error variance may not be constant, even when considering a quadratic model?
  • What can you notice in the normal probability plot? Is there evidence that the deviations from the regression parabola may not behave like Gaussian errors? Are they closer to normality than the deviations from the regression line? To visualize the fitted quadratic regression, use Stat > Regression > Fitted line plot , and the “Quadratic” option. Is the R^2 for the quadratic regression higher than the one obtained with the simple linear regression? Using Stat > Basic Statistics > Correlation , compute the correlation between y=Weight and x=Length. Verify that the R^2 for the simple linear regression is the square of the correlation coefficient, and the R^2 for is not.

Load the file SALARY.MTW, from the Minitab example data sets, Student 12 subdirectory. This contains several variables for n=171 faculty in a small college, including y=1991$ (salary in 1991, the current year in the study) and x=Begin$ (salary when each faculty was hired). Consider the simple linear regressions of y on x, and using Stat > Regression > Regression > Graphs , produce the plot of standardized residuals vs x=Begin$.

  • Is there any outlier? Look for residuals that stand out relative to the other residuals and/or that have extreme values (e.g. ~4; these are standardized). From the regression output providing unusual observation, identify the observation with the largest standardized residual. Use Data >Subset worksheet (“Specify row number” option) to remove this observation from the data set, then run the regression again.
  • Did the regression fit change in a substantial way? Look at R^2 , and estimated slope and intercept. A substantial change in the estimated regression parameters would make this outlier influential (much more about this later).

2

Load the file MASSCOLL.MTW from the Minitab example data sets, Student 12 subdirectory. Consider the simple linear regressions of y=“%WhoGrad” on x=CSAT, and using Stat > Regression > Regression > Graphs , produce the plot of regular residuals vs x=CSAT, and the normal probability plot for regular residuals.

  • Is there evidence of departure from linearity, non-constant error variance or non- normality of errors in this case? Now using again Stat > Regression > Regression > Graphs , produce the plot of regular residuals vs other variables in the data set, that you may want to consider in addition to x=CSAT as predictors in a more complex regression model. The issue here is using the residuals of the regression of y=“%WhoGrad” on x=CSAT to see if any other variable may “capture something” of y that has been left out by x. If an additional variable, say w, captures something that has been left out by x, the plot of residuals vs w ought to show a “trace” of this in the form of a systematic pattern.
  • Can you find any variables that might constitute useful additional predictors? How about w=SFratio?

Load the file NEWMARKET.MTW. This contains several variables recorded for n= consecutive months, for a firm – including y=Sales and x=Advertis (advertisement expenditures) in thousands of dollars. Consider the simple linear regression of y on x. note, and using Stat > Regression > Regression > Graphs , produce the plot of regular residuals vs x=Advertis, the plot of regular residuals vx Index (this variable just records the order of the 10 consecutive months), and the normal probability plot for regular residuals.

  • Is there any evident mean pattern in the residuals vs x=Advertis? Is there any evident mean pattern in the residuals vs the order expressed by Index? You can think of the natural order among the observed units (months) as a special kind of “additional predictor”. The existence of a pattern in the plot of residuals vs this order indicates that the errors corresponding to various units are not independent – in other words, the order captures something about y.
  • Look at the normal probability plot; do you think we can draw any conclusions about whether there is evidence of non-normality of errors? With very small n, this plot does not seem to be very informative…