test_symmetry {LambertW} | R Documentation |
Test symmetry based on Lambert W heavy tail(s)
Description
Performs a test for the null hypothesis of symmetry, H_0: \delta_l =
\delta_r
, versus the alternative of asymmetry. This can be done using a Wald
test of the linear restriction H_0: \delta_l - \delta_r = 0
or a
likelihood ratio test.
By default it uses "Wald"
test since this only requires the Hessian of
the "hh"
Lambert W fit. The "LR"
test requires the
log-likelihood values for both MLEs (type "h"
and "hh"
) and
thus takes longer to compute.
Usage
test_symmetry(LambertW.fit, method = c("Wald", "LR"))
Arguments
LambertW.fit |
an object of class |
method |
test methodology: |
Value
A list of class "htest"
containing:
statistic |
value of the test statistic, |
p.value |
p-value for the test, |
method |
character string describing the test, |
data.name |
a character string giving the name(s) of the data. |
Examples
## Not run:
# skewed
yy <- rLambertW(n = 500, theta = list(delta = c(0.1, 0.25), beta = c(2, 1)),
distname = "normal")
fit.ml <- MLE_LambertW(yy, type = "hh", distname = "normal",
hessian = TRUE)
summary(fit.ml)
test_symmetry(fit.ml, "LR")
test_symmetry(fit.ml, "Wald")
# symmetric
yy <- rLambertW(n = 500, theta = list(delta = c(0.2, 0.2), beta = c(2, 1)),
distname = "normal")
fit.ml <- MLE_LambertW(yy, type = "hh", distname = "normal")
summary(fit.ml)
test_symmetry(fit.ml, "LR")
test_symmetry(fit.ml, "Wald")
## End(Not run)