
## Cox Test for Comparing Non-Nested Models


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

```{r}
#| label = "{{DataName}}.cox"
{{DataName}}.cox = coxtest({{DataName}}.lm1,{{DataName}}.lm2)
{{DataName}}.cox
```

## The encompassing test of Davidson & MacKinnon for comparing non-nested models.



```{r}
#| label = "{{DataName}}.encomp"
{{DataName}}.encomp = encomptest({{DataName}}.lm1,{{DataName}}.lm2)
{{DataName}}.encomp
```



## The Davidson-MacKinnon J test for comparing non-nested models

```{r}
#| label = "{{DataName}}.j"
{{DataName}}.j = jtest({{DataName}}.lm1,{{DataName}}.lm2)
{{DataName}}.j
```

