Skip to content

Comprehensive Stata do-file for testing and correcting violations of classical OLS assumptions: model specification, heteroskedasticity, multicollinearity, spatial autocorrelation, endogeneity, residual normality, and outlier/influence detection.

License

Notifications You must be signed in to change notification settings

pablo-reyes8/ols-diagnostics-stata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OLS-Diagnostics-Stata

Comprehensive Stata do-file for testing and correcting violations of classical OLS assumptions


Description

This repository contains a single Stata do-file that implements a full suite of diagnostic tests and remedies for violations of the classical linear regression assumptions in cross-sectional data:

  1. Model Specification
  2. Heteroskedasticity
  3. Multicollinearity
  4. Spatial Autocorrelation
  5. Endogeneity
  6. Residual Normality
  7. Outlier & Influence Detection

Usage

  1. Clone this repository:
    git clone https://github.com/your-username/OLS-Diagnostics-Stata.git
  2. Open Stata and run the do-file
  3. Review the log output and graphs to identify any assumption violations.
  4. Apply the suggested corrective commands included in each section if needed.

File Structure

.
├── Regression Assumptions.do   # Main Stata script with all tests & remedies
├── Lawsch85.xlsx               # Dataset used to run the script
└── README.md                   # Project documentation

Contributing

Contributions are welcome! Please open issues or submit pull requests at
https://github.com/pablo-reyes8

License

This project is licensed under the Apache License 2.0.

Contribution

Feel free to open issues or submit pull requests to add more diagnostics, improve formatting, or support panel/time-series extensions.

About

Comprehensive Stata do-file for testing and correcting violations of classical OLS assumptions: model specification, heteroskedasticity, multicollinearity, spatial autocorrelation, endogeneity, residual normality, and outlier/influence detection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages