hg.test {verification} | R Documentation |
Hering-Genton Statistic
Description
Calculate the Hering-Genton test statistic and its p-value
Usage
hg.test(loss1, loss2, alternative = c("two.sided", "less", "greater"),
mu = 0, alpha = 0.05, plot = FALSE, type = "OLS" )
Arguments
loss1 |
The loss series for the first model |
loss2 |
The loss series for the second model |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". |
mu |
a number indicating the true value of the mean loss differential |
alpha |
the size for the test. |
plot |
logical, should the ACF and PACF functions be plotted for each of the loss functions and the loss differential. Also produces a scatter plot of the auto-covariances against the lag terms. |
type |
Should ordinary (default) or weighted loss be used? |
Details
The Hering-Genton test (Hering and Genton 2011) uses a parametric model (in this case the exponential) fit to the auto-covariance function (using all the lags up to half the total distance in the series) and uses a weighted average of all the lag terms from this parametric model as an estiamte for the standard error of the mean loss differential statistic. The rest is a usual paired t-test for differences in mean whereby the standard error is estimated using the (single) differenced series (the loss differential series) and accounts for temporal dependence. The series need not be loss series.
Value
An object of class “htest” is returned with components:
statistic |
The value of the estimated test statistic. |
p.value |
The estimated p-value. |
conf.int |
a confidence interval for the mean appropriate to the specified alternative hypothesis. |
estimate |
the estimated mean-loss differential. |
null.value |
the specified hypothesized value of the mean loss differential. |
stderr |
the estimated standard error. |
alternative , method |
a character string describing the alternative hypothesis. |
data.name |
a character vector giving the names of the data. |
Author(s)
Eric Gilleland
References
Hering, A. S. and Genton, M. G. (2011) Comparing Spatial Predictions. Technometrics, 53 (4), 414–425. doi: 10.1198/TECH.2011.10136.
See Also
Examples
## Not run:
x <- arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
y <- arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
rho <- cbind( c( 1, 0.8 ), c( 0.8, 1 ) )
xy <- t( rho
hg.test( abs( xy[,1] ), abs( xy[,2] ) )
t.test( abs( xy[,1] ) - abs( xy[,2] ) )
## End(Not run)