Next: Concept Lab
Up: Inferences for Simple Linear
Previous: Residual Plots and Regression
The goal of this lab is to learn how to use StataQuest to do data
analysis and how to use the diagnostic plots provided by Stataquest
to check the model assumption.
We will need the following commands for the regression analysis:
Statistics
Simple Regression.
There are many interesting diagnostic
plots provided by StataQuest. To understand them, we can use the
following example:
First open the data file reg.dta under the datagen
directory. There are several variables
in the file:
- X: the independent variable.
- e: the deviation which contains a random sample from a normal distribution.
- Y: Y=1+X+e
-
:
-
:
-
:
= Y except the observation corresponding to the
max(X) is replaced by the original Y value plus 20. -
:
= Y except the observation with the X value
closest to
is replaced by the original Y value plus 20.
You may look at the normal quantile plot of e and the scatter plot
of e versus X and then compare them with the diagnostic plots
provided by Stataquest after you regress Y on X. You may also want to
get the diagnostic plots after regressing
and
on X,
respectively. What do you learn from the plots? Now compare the LS
lines for Y,
,
vs. X. What kind of observation has
more potential to be influential?
Jan Lethen
Wed Nov 13 16:20:46 CST 1996