Performs Vuong test between two fitted objects of class
unitquantreg
Usage
vuong.test(object1, object2, alternative = c("two.sided", "less", "greater"))Arguments
- object1, object2
objects of class
unitquantregcontaining the fitted models.- alternative
indicates the alternative hypothesis and must be one of
"two.sided"(default),"less", or"greater". You can specify just the initial letter of the value, but the argument name must be given in full. See ‘Details’ for the meanings of the possible values.
Value
A list with class "htest" containing the following
components:
- statistic
the value of the test statistic.
- p.value
the p-value of the test.
- alternative
a character string describing the alternative hypothesis.
- method
a character string with the method used.
- data.name
a character string ginven the name of families models under comparison.
Details
The statistic of Vuong likelihood ratio test for compare two non-nested regression models is defined by $$T = \frac{1}{\widehat{\omega}^2\,\sqrt{n}}\,\sum_{i=1}^{n}\, \log\frac{f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})}{ g(y_i \mid \boldsymbol{x}_i,\widehat{\boldsymbol{\gamma}})}$$ where $$\widehat{\omega}^2 = \frac{1}{n}\,\sum_{i=1}^{n}\,\left(\log \frac{f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})}{g(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\gamma}})}\right)^2 - \left[\frac{1}{n}\,\sum_{i=1}^{n}\,\left(\log \frac{f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})}{ g(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\gamma}})}\right)\right]^2$$ is an estimator for the variance of \(\frac{1}{\sqrt{n}}\,\displaystyle\sum_{i=1}^{n}\,\log\frac{f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})}{g(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\gamma}})}\), \(f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})\) and \(g(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\gamma}})\) are the corresponding rival densities evaluated at the maximum likelihood estimates.
When \(n \rightarrow \infty\) we have that \(T \rightarrow N(0, 1)\) in distribution. Therefore, at \(\alpha\%\) level of significance the null hypothesis of the equivalence of the competing models is rejected if \(|T| > z_{\alpha/2}\), where \(z_{\alpha/2}\) is the \(\alpha/2\) quantile of standard normal distribution.
In practical terms, \(f(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\theta}})\) is better (worse) than \(g(y_i \mid \boldsymbol{x}_i, \widehat{\boldsymbol{\gamma}})\) if \(T>z_{\alpha/2}\) (or \(T< -z_{\alpha/2}\)).
References
Vuong, Q. (1989). Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica, 57(2), 307--333.
Examples
data(sim_bounded, package = "unitquantreg")
sim_bounded_curr <- sim_bounded[sim_bounded$family == "uweibull", ]
fit_uweibull <- unitquantreg(formula = y1 ~ x, tau = 0.5,
data = sim_bounded_curr,
family = "uweibull")
fit_kum <- unitquantreg(formula = y1 ~ x, tau = 0.5,
data = sim_bounded_curr,
family = "kum")
ans <- vuong.test(object1 = fit_uweibull, object2 = fit_kum)
ans
#>
#> Vuong likelihood ratio test for non-nested models (unit-Weibull versus
#> Kumaraswamy)
#>
#> data: unit-Weibull versus Kumaraswamy
#> T_LR = 3.9677, p-value = 7.258e-05
#>
str(ans)
#> List of 4
#> $ statistic: Named num 3.97
#> ..- attr(*, "names")= chr "T_LR"
#> $ p.value : Named num 7.26e-05
#> ..- attr(*, "names")= chr "T_LR"
#> $ method : chr "Vuong likelihood ratio test for non-nested models (unit-Weibull versus Kumaraswamy)"
#> $ data.name: chr "unit-Weibull versus Kumaraswamy"
#> - attr(*, "class")= chr "htest"