Files
OpenBB/website/content/terminal/reference/econometrics/dwat.md
DidierRLopes 4ad995fdd0 Docs/terminalpro and improvement (#5622)
* add first iteration of content for Terminal Pro

* Update index.md

* Update dashboards.md

* Update folders.md

* Update grouping.md

* Update report.md

* Update templates.md

* Update quick-start.md

* Update index.md

* Update index.md

* Update home.md

* Update news.md

* Update index.md

* Update index.md

* Update index.md

* Update data-provider.md

* Update chat-with-widget.md

* Update data-manipulation.md

* Update forecasting.md

* fix: images self closing tags

* fix: only pro visitors can see pro

* inter font

* improve SEO content and restructuring

* add new package for toggle on tutorials

* move folder around

* improve main page of each prod

* small updates and improvements

* fix logo above

* small improvement in headtitle for portfolio funcs

* fix typos from OpenAI's GPT-4

* fix _category_ json

* remove generic SEO words

* add script that generates SEO for documentation

* add missing file

* remove sdk warning message

* fix links for andrew

---------

Co-authored-by: jose-donato <zmcdonato@gmail.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
2023-10-30 21:01:29 +00:00

90 lines
3.6 KiB
Markdown
Vendored

---
title: dwat
description: The 'dwat' documentation page provides comprehensive information about
Durbin-Watson autocorrelation test, its usage with Ordinary Least Squares (OLS)
regression, and potential issues and solutions with multi-collinearity and numerical
problems. The page features examples with a Python command, its parameters, and
regression results to provide a practical understanding of the concepts.
keywords:
- dwat
- autocorrelation tests
- Durbin-Watson
- OLS
- independent variables
- dependent variables
- regression results
- plot
- residuals
- multicollinearity
- numerical problems
- analytics
- statistics
- econometrics
- statistical analysis
---
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
<HeadTitle title="econometrics /dwat - Reference | OpenBB Terminal Docs" />
Show autocorrelation tests from Durbin-Watson. Needs OLS to be run in advance with independent and dependent variables
### Usage
```python
dwat [-p]
```
---
## Parameters
| Name | Description | Default | Optional | Choices |
| ---- | ----------- | ------- | -------- | ------- |
| plot | Plot the residuals | False | True | None |
---
## Examples
```python
2022 Feb 24, 05:59 (🦋) /econometrics/ $ ols -d adj_close-msft -i adj_close-aapl -i adj_close-googl -i adj_close-tsla
OLS Regression Results
==============================================================================
Dep. Variable: adj_close_msft R-squared: 0.977
Model: OLS Adj. R-squared: 0.977
Method: Least Squares F-statistic: 1.068e+04
Date: Thu, 24 Feb 2022 Prob (F-statistic): 0.00
Time: 12:00:01 Log-Likelihood: -2830.6
No. Observations: 759 AIC: 5669.
Df Residuals: 755 BIC: 5688.
Df Model: 3
Covariance Type: nonrobust
===================================================================================
coef std err t P|t| [0.025 0.975]
-----------------------------------------------------------------------------------
Intercept 27.7984 2.166 12.832 0.000 23.546 32.051
adj_close_aapl 0.8662 0.034 25.503 0.000 0.800 0.933
adj_close_googl 0.0508 0.002 30.374 0.000 0.048 0.054
adj_close_tsla -0.0007 0.004 -0.181 0.856 -0.009 0.007
==============================================================================
Omnibus: 41.445 Durbin-Watson: 0.044
Prob(Omnibus): 0.000 Jarque-Bera (JB): 47.398
Skew: 0.612 Prob(JB): 5.10e-11
Kurtosis: 2.995 Cond. No. 1.16e+04
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[2] The condition number is large, 1.16e+04. This might indicate that there are
strong multicollinearity or other numerical problems.
2022 Feb 24, 06:00 (🦋) /statistics/ $ dwat -p
The result 0.04 is outside the range 1.5 and 2.5 and therefore autocorrelation can be problematic.
Please consider lags of the dependent or independent variable.
```
![durbin_watson example](https://user-images.githubusercontent.com/46355364/155514788-caaa65a2-1f5f-41d0-8db2-06e682d5a53e.png)
---