Running examples in 'clarkeTest-Ex.R' failed
The error most likely occurred in:

> ### Name: clarke_test
> ### Title: Clarke Test
> ### Aliases: clarke_test
> 
> ### ** Examples
> 
> data(conflictData)
> ## Linear Model
> lm1 <- lm(riots ~ log(rgdpna_pc) + log(pop*1000) +
+     polity2, data=conflictData)
> lm2 <- lm(riots ~ rgdpna_pc + pop +
+     polity2, data=conflictData)
> clarke_test(lm1, lm2)

Clarke test for non-nested models

Model 1 log-likelihood: -8446
Model 2 log-likelihood: -8433
Observations: 4381
Test statistic: 1830 (42%)

Model 2 is preferred (p < 2e-16)

> 
> ## Binomial GLM
> glm1 <- glm(conflict_binary ~ log(rgdpna_pc) +
+           log(pop*1000) + polity2, data=conflictData,
+           family=binomial)
> glm2 <- glm(conflict_binary ~ rgdpna_pc + pop +
+           polity2, data=conflictData,
+           family=binomial)
> clarke_test(glm1, glm2)

Clarke test for non-nested models

Model 1 log-likelihood: -1982
Model 2 log-likelihood: -2164
Observations: 4381
Test statistic: 2655 (61%)

Model 1 is preferred (p < 2e-16)

> 
> ## Poisson GLM
> glm1a <- glm(riots ~ log(rgdpna_pc) +
+               log(pop*1000) + polity2,
+              data=conflictData,
+              family=poisson)
> glm2a <- glm(riots ~ rgdpna_pc + pop +
+               polity2, data=conflictData,
+             family=poisson)
> clarke_test(glm1a, glm2a)

Clarke test for non-nested models

Model 1 log-likelihood: -4778
Model 2 log-likelihood: -5065
Observations: 4381
Test statistic: 2750 (63%)

Model 1 is preferred (p < 2e-16)

> 
> ## Negative Binomial GLM
> library(MASS)
> glm1b <- glm.nb(riots ~ log(rgdpna_pc) +
+                log(pop*1000) + polity2,
+                data=conflictData)
> glm2b <- glm.nb(riots ~ rgdpna_pc + pop +
+                polity2, data=conflictData)
> clarke_test(glm1b, glm2b)

Clarke test for non-nested models

Model 1 log-likelihood: -3220
Model 2 log-likelihood: -3289
Observations: 4381
Test statistic: 2464 (56%)

Model 1 is preferred (p < 2e-16)

> 
> ## Ordered Logit: polr
> library(MASS)
> ol1 <- polr(as.factor(Amnesty) ~ log(rgdpna_pc) +
+                   log(pop*1000) + polity2,
+                 data=conflictData)
> ol2 <- polr(as.factor(Amnesty) ~ scale(rgdpna_pc) +
+             scale(pop) + polity2,
+             data=conflictData)
> clarke_test(ol1, ol2)

Clarke test for non-nested models

Model 1 log-likelihood: -5744
Model 2 log-likelihood: -5910
Observations: 4381
Test statistic: 2714 (62%)

Model 1 is preferred (p < 2e-16)

> 
> ## Ordered Logit: clm
> library(ordinal)
Error in library(ordinal) : there is no package called 'ordinal'
Execution halted