Preview

Sas Lecture

Satisfactory Essays
Open Document
Open Document
676 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Sas Lecture
MFE 6390 Spring 2013

Residual analysis in SAS (continued)

In the previous two lectures, we learnt how to obtain the residuals of the estimation and to formally test for heteroscedasticity in the model. In this lecture, we will focus on testing the model errors for serial correlation.

Recall that, in order to make valid inferences using the linear regression estimates, we need the errors of the model (i.e. residuals) to satisfy the following key assumption:

• The errors of the model are independent of each other (this is the assumption of non-serial correlation): [pic] for [pic].

How do we test for serial correlation?

We will estimate a simple model with two explanatory variables of the form: [pic]

First, we will obtain the residuals of the model and obtain graphs that can provide informal evidence of serial correlation in the model. A possible graph is one of the residuals plotted against time. Another possibility is a graph of the residuals plotted against the one-period lagged residuals. Any obvious patterns in these graphs could provide informal evidence of serial correlation in the underlying data. We will also perform the Durbin Watson test, the Breusch-Godfrey serial correlation LM test, and some other techniques to look for formal evidence of serial correlation in the model.

Let us start with the following program:

*Run a linear regression model and obtain the residuals. Also get the Durbin Watson test statistic results;

PROC REG DATA = serial; MODEL y = x2 x3/dw; OUTPUT OUT = oserial RESIDUAL = rserial; TITLE ‘Durbin-Watson test for first-order serial correlation’;
RUN;

DATA oserial2; SET oserial;

rserialag = LAG1(rserial);

PROC GPLOT DATA = oserial2; PLOT rserial * year; TITLE ‘Graphical test 1 of serial correlation’; PLOT rserial * rserialag; PLOT rserial * rserialag/href=0 vref=0 (jia heng zong zhou) TITLE

You May Also Find These Documents Helpful

  • Powerful Essays

    d) What is the value of the coefficient of determination? Give an interpretation of this value in context.…

    • 909 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    The requirement for validation of the linearity assumption is that the residuals must be randomly distributed around their mean. As can be seen from figure IV (a) above, the residuals are fairly random in their distribution along the mean (0) both above and below zero. Therefore we can conclude that the linearity assumption is reasonable in this case.…

    • 2706 Words
    • 11 Pages
    Good Essays
  • Satisfactory Essays

    BUSI 405 Research Paper

    • 404 Words
    • 2 Pages

    *Mean of NHS for the historical period is 60.08 and for the holdout period is 23.42…

    • 404 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    ECON 300 HW9

    • 811 Words
    • 4 Pages

    -Pure heteroskedasticity does not cause bias in the coefficient estimates. However, it typically causes OLS to no longer be the minimum-variance estimator. The error term causes the independent variable to fluctuate more, increasing their variance. Moreover, the OLS estimates of the standard errors become biased, leading to unreliable hypothesis testing. Heteroskedasticity increases the variance of the estimated coefficients variance, but OLS underestimates the variance.…

    • 811 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Stats Final guide

    • 3002 Words
    • 13 Pages

    (a) The type ll error is more important than type l error (b)  is larger then …

    • 3002 Words
    • 13 Pages
    Good Essays
  • Satisfactory Essays

    Project 2

    • 454 Words
    • 2 Pages

    4. What trend can you observe from the data? List reasons that could explain the…

    • 454 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    econ 4140

    • 555 Words
    • 3 Pages

    This course is an introduction to financial econometrics. Background knowledge of finance is not required. The objective of the course is to explain, in simple terms, the use of selected statistical methods and econometric models in finance. The content of the course includes simple static and dynamic models of financial returns, elements of portfolio theory, the CAPM regression model, elements of option pricing, the Value-at-Risk (VaR), and the ARCH model.…

    • 555 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    econ 513 final exam

    • 2264 Words
    • 10 Pages

    (i) Precisely state the null hypothesis in the overidentifying restrictions tests in the IV regression such as…

    • 2264 Words
    • 10 Pages
    Satisfactory Essays
  • Good Essays

    Which is relationship between a variable over various time intervals. The covariance error does not equal to zero as well. Visual inspection could be done with the 4-1 plot. We can use the Durbin Watson test to detect it, as well as LM test. If the variance is not equal to 1 then we will have serial correlation. In this case we won’t even be able to use the F-test and T-test because it will be unreliable and result will be inefficient. But getting a better data and variables will be helpful. For my company which is Dick’s Sporting good some of the data that I wanted were hard to find so I used the best one I can find that is available. A potential fix for temporary solution might be by adding lag but we still need to come up with a better one.…

    • 1600 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    is effective at detecting one-step autocorrelation, but poor at detecting nonstationariy. A second test is…

    • 3860 Words
    • 16 Pages
    Powerful Essays
  • Good Essays

    pride and prejudice

    • 713 Words
    • 3 Pages

    Insert a complete data table, including appropriate significant figures and units, in the space below. Also include any observations that you made…

    • 713 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Graded Hw

    • 1064 Words
    • 5 Pages

    1. A candy bar manufacturer is interested in trying to estimate how sales are influenced by the price of their product. To do so, the company randomly chooses 6 small cities and offers the candy bar at different prices. Using the candy bar sales as the dependent variable, the company will conduct a simple linear regression on the data below:…

    • 1064 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    VaR and Risk management

    • 7530 Words
    • 89 Pages

    In order to evaluate the quality of the VaR estimates, the models should always be…

    • 7530 Words
    • 89 Pages
    Powerful Essays
  • Good Essays

    The Dickey Fuller Test has three main versions of tests to it. The first version is the unit test root test whose, the second one is the unit test root with a drift and the third is the unit root test with drift and deterministic time trend. Each test version has its own critical value which is dependent on the sample size. The tests incapable of distinguishing between the near unit- root processes and the true unit-root processes.…

    • 378 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Leadership

    • 6149 Words
    • 25 Pages

    * Write down the linear model in conditional expectation form and in the error form and explain why the conditional expectation form of the model is more realistic than the assumption that the regressors are deterministic.…

    • 6149 Words
    • 25 Pages
    Powerful Essays