
## Durbin-Watson Test

Description: Performs the Durbin-Watson test for autocorrelation of disturbances.

```{r}
#| label = "GetLibLMTestPkg"
library(lmtest)
```

```{r}
#| label = "{{DataName}}.dw"
{{DataName}}.dw = {{DataName}}.lm |> dwtest()
{{DataName}}.dw
```


## Breusch-Godfrey Test

Description: performs the Breusch-Godfrey test for higher-order serial correlation.

```{r}
#| label = "{{DataName}}.bg"
{{DataName}}.bg = {{DataName}}.lm |> bgtest(order=10)
{{DataName}}.bg
```

